diff --git .classpath._hbase .classpath._hbase deleted file mode 100644 index 15fd1c5..0000000 --- .classpath._hbase +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git build-common.xml build-common.xml index 53fd1b1..805b73c 100644 --- build-common.xml +++ build-common.xml @@ -25,6 +25,8 @@ + + @@ -34,6 +36,8 @@ + + @@ -101,7 +105,7 @@ - + @@ -159,18 +163,18 @@ log="${ivyresolvelog}"/> - - - - - + + + + - + @@ -461,4 +465,17 @@ + + + + + + + + + + + + + diff --git build.xml build.xml index dc20725..753fd22 100644 --- build.xml +++ build.xml @@ -25,6 +25,8 @@ + + @@ -91,6 +93,17 @@ + + + + + + + + + + + @@ -121,7 +134,7 @@ - @@ -165,6 +178,10 @@ + + + + @@ -212,7 +229,7 @@ - + @@ -320,7 +337,7 @@ - + @@ -452,6 +469,7 @@ + @@ -461,6 +479,8 @@ + + diff --git eclipse-templates/.classpath eclipse-templates/.classpath index d06d6bd..c0434ef 100644 --- eclipse-templates/.classpath +++ eclipse-templates/.classpath @@ -16,10 +16,10 @@ - - - - + + + + @@ -33,8 +33,10 @@ - - + + + + @@ -48,7 +50,7 @@ - + diff --git eclipse-templates/.classpath._hbase eclipse-templates/.classpath._hbase index b81c24a..3229053 100644 --- eclipse-templates/.classpath._hbase +++ eclipse-templates/.classpath._hbase @@ -6,29 +6,29 @@ - + - - - - - - + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -42,7 +42,7 @@ - + @@ -53,7 +53,7 @@ - + - + diff --git ivy/libraries.properties ivy/libraries.properties index fdd54c8..ef24aff 100644 --- ivy/libraries.properties +++ ivy/libraries.properties @@ -35,11 +35,16 @@ commons-lang.version=2.4 commons-logging.version=1.0.4 commons-logging-api.version=1.0.4 commons-pool.version=1.5.4 +hbase.version=0.20.3 +hbase-test.version=0.20.3 jdo-api.version=3.0.0 jdom.version=1.1 jline.version=0.9.94 junit.version=3.8.1 ivy.version=2.1.0 log4j.version=1.2.15 +slf4j-api.version=1.6.1 +slf4j-log4j12.version=1.6.1 +thrift.version=0.5.0 +thrift-fb303.version=0.5.0 zookeeper.version=3.2.2 - diff --git lib/README lib/README index 72d90b7..1c2f0b1 100644 --- lib/README +++ lib/README @@ -1,8 +1,8 @@ Folowing is the list of external jars contained in this directory and the sources from where they were obtained: --------------------------------------------------------------------------------------------------------------- -* libfb303.jar - http://developers.facebook.com/thrift/ -* libthrift.jar - http://developers.facebook.com/thrift/ +* thrift-0.5.0.jar - http://thrift.apache.org/ +* thrift-fb303-0.5.0.jar - http://thrift.apache.org/ * jpox-core-1.2.2.jar - http://www.jpox.org/docs/download.html * derby.jar - http://db.apache.org/derby/derby_downloads.html * asm-3.1.jar - http://forge.objectweb.org/projects/asm/ diff --git lib/libfb303.LICENSE lib/libfb303.LICENSE deleted file mode 100644 index 6b5c3b1..0000000 --- lib/libfb303.LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Thrift Software License - -Copyright © 2006- Facebook, Inc. - -Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the -software and accompanying documentation covered by this license (the "Software") to use, reproduce, -display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, -and to permit third-parties to whom the Software is furnished to do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including the above license grant, -this restriction and the following disclaimer, must be included in all copies of the Software, in whole -or in part, and all derivative works of the Software, unless such copies or derivative works are solely -in the form of machine-executable object code generated by a source language processor. - -The software is provided "as is", without warranty of any kind, express or implied, including but not -limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement. -In no event shall the copyright holders or anyone distributing the software be liable for any damages or -other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the -software or the use or other dealings in the software. diff --git lib/libfb303.jar lib/libfb303.jar deleted file mode 100644 index 516b597..0000000 Binary files lib/libfb303.jar and /dev/null differ diff --git lib/libthrift.LICENSE lib/libthrift.LICENSE deleted file mode 100644 index 6b5c3b1..0000000 --- lib/libthrift.LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Thrift Software License - -Copyright © 2006- Facebook, Inc. - -Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the -software and accompanying documentation covered by this license (the "Software") to use, reproduce, -display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, -and to permit third-parties to whom the Software is furnished to do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including the above license grant, -this restriction and the following disclaimer, must be included in all copies of the Software, in whole -or in part, and all derivative works of the Software, unless such copies or derivative works are solely -in the form of machine-executable object code generated by a source language processor. - -The software is provided "as is", without warranty of any kind, express or implied, including but not -limited to the warranties of merchantability, fitness for a particular purpose, title and non-infringement. -In no event shall the copyright holders or anyone distributing the software be liable for any damages or -other liability, whether in contract, tort, or otherwise, arising from, out of or in connection with the -software or the use or other dealings in the software. diff --git lib/libthrift.jar lib/libthrift.jar deleted file mode 100644 index 7e7f90e..0000000 Binary files lib/libthrift.jar and /dev/null differ diff --git lib/thrift-0.5.0.jar lib/thrift-0.5.0.jar new file mode 100644 index 0000000..f38617b Binary files /dev/null and lib/thrift-0.5.0.jar differ diff --git lib/thrift-fb303-0.5.0.jar lib/thrift-fb303-0.5.0.jar new file mode 100644 index 0000000..bad90ce Binary files /dev/null and lib/thrift-fb303-0.5.0.jar differ diff --git lib/thrift-fb303.LICENSE lib/thrift-fb303.LICENSE new file mode 100644 index 0000000..4eacb64 --- /dev/null +++ lib/thrift-fb303.LICENSE @@ -0,0 +1,16 @@ +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. diff --git lib/thrift.LICENSE lib/thrift.LICENSE new file mode 100644 index 0000000..9d189ef --- /dev/null +++ lib/thrift.LICENSE @@ -0,0 +1,324 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. + +-------------------------------------------------- +SOFTWARE DISTRIBUTED WITH THRIFT: + +The Apache Thrift software includes a number of subcomponents with +separate copyright notices and license terms. Your use of the source +code for the these subcomponents is subject to the terms and +conditions of the following licenses. + +-------------------------------------------------- +Portions of the following files are licensed under the MIT License: + + lib/erl/src/Makefile.am + +Please see doc/otp-base-license.txt for the full terms of this license. + + +-------------------------------------------------- +The following files contain some portions of code contributed under +the Thrift Software License (see doc/old-thrift-license.txt), and relicensed +under the Apache 2.0 License: + + compiler/cpp/Makefile.am + compiler/cpp/src/generate/t_cocoa_generator.cc + compiler/cpp/src/generate/t_cpp_generator.cc + compiler/cpp/src/generate/t_csharp_generator.cc + compiler/cpp/src/generate/t_erl_generator.cc + compiler/cpp/src/generate/t_hs_generator.cc + compiler/cpp/src/generate/t_java_generator.cc + compiler/cpp/src/generate/t_ocaml_generator.cc + compiler/cpp/src/generate/t_perl_generator.cc + compiler/cpp/src/generate/t_php_generator.cc + compiler/cpp/src/generate/t_py_generator.cc + compiler/cpp/src/generate/t_rb_generator.cc + compiler/cpp/src/generate/t_st_generator.cc + compiler/cpp/src/generate/t_xsd_generator.cc + compiler/cpp/src/main.cc + compiler/cpp/src/parse/t_field.h + compiler/cpp/src/parse/t_program.h + compiler/cpp/src/platform.h + compiler/cpp/src/thriftl.ll + compiler/cpp/src/thrifty.yy + lib/csharp/src/Protocol/TBinaryProtocol.cs + lib/csharp/src/Protocol/TField.cs + lib/csharp/src/Protocol/TList.cs + lib/csharp/src/Protocol/TMap.cs + lib/csharp/src/Protocol/TMessage.cs + lib/csharp/src/Protocol/TMessageType.cs + lib/csharp/src/Protocol/TProtocol.cs + lib/csharp/src/Protocol/TProtocolException.cs + lib/csharp/src/Protocol/TProtocolFactory.cs + lib/csharp/src/Protocol/TProtocolUtil.cs + lib/csharp/src/Protocol/TSet.cs + lib/csharp/src/Protocol/TStruct.cs + lib/csharp/src/Protocol/TType.cs + lib/csharp/src/Server/TServer.cs + lib/csharp/src/Server/TSimpleServer.cs + lib/csharp/src/Server/TThreadPoolServer.cs + lib/csharp/src/TApplicationException.cs + lib/csharp/src/Thrift.csproj + lib/csharp/src/Thrift.sln + lib/csharp/src/TProcessor.cs + lib/csharp/src/Transport/TServerSocket.cs + lib/csharp/src/Transport/TServerTransport.cs + lib/csharp/src/Transport/TSocket.cs + lib/csharp/src/Transport/TStreamTransport.cs + lib/csharp/src/Transport/TTransport.cs + lib/csharp/src/Transport/TTransportException.cs + lib/csharp/src/Transport/TTransportFactory.cs + lib/csharp/ThriftMSBuildTask/Properties/AssemblyInfo.cs + lib/csharp/ThriftMSBuildTask/ThriftBuild.cs + lib/csharp/ThriftMSBuildTask/ThriftMSBuildTask.csproj + lib/rb/lib/thrift.rb + lib/st/README + lib/st/thrift.st + test/OptionalRequiredTest.cpp + test/OptionalRequiredTest.thrift + test/ThriftTest.thrift + +-------------------------------------------------- +For the aclocal/ax_boost_base.m4 and contrib/fb303/aclocal/ax_boost_base.m4 components: + +# Copyright (c) 2007 Thomas Porschberg +# +# Copying and distribution of this file, with or without +# modification, are permitted in any medium without royalty provided +# the copyright notice and this notice are preserved. + +-------------------------------------------------- +For the compiler/cpp/src/md5.[ch] components: + +/* + Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + L. Peter Deutsch + ghost@aladdin.com + + */ + +--------------------------------------------------- +For the lib/rb/setup.rb: Copyright (c) 2000-2005 Minero Aoki, +lib/ocaml/OCamlMakefile and lib/ocaml/README-OCamlMakefile components: + Copyright (C) 1999 - 2007 Markus Mottl + +Licensed under the terms of the GNU Lesser General Public License 2.1 +(see doc/lgpl-2.1.txt for the full terms of this license) diff --git metastore/build.xml metastore/build.xml index ffb86c1..b05d6f1 100755 --- metastore/build.xml +++ metastore/build.xml @@ -22,10 +22,10 @@ - - Executing thrift (which needs to be in your path) to build java metastore APIs.... - - + + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_metastore.thrift + + diff --git metastore/if/hive_metastore.thrift metastore/if/hive_metastore.thrift index 9c314cc..8a10bfc 100755 --- metastore/if/hive_metastore.thrift +++ metastore/if/hive_metastore.thrift @@ -3,7 +3,7 @@ # Thrift Service that the MetaStore is built on # -include "thrift/fb303/if/fb303.thrift" +include "share/fb303/if/fb303.thrift" namespace java org.apache.hadoop.hive.metastore.api namespace php metastore diff --git metastore/ivy.xml metastore/ivy.xml index 2e39eb8..eb65e1b 100644 --- metastore/ivy.xml +++ metastore/ivy.xml @@ -1,3 +1,19 @@ + @@ -47,5 +63,7 @@ + + diff --git metastore/src/gen-cpp/ThriftHiveMetastore.cpp metastore/src/gen-cpp/ThriftHiveMetastore.cpp index 566e4e9..bbcc23a 100644 --- metastore/src/gen-cpp/ThriftHiveMetastore.cpp +++ metastore/src/gen-cpp/ThriftHiveMetastore.cpp @@ -7,28 +7,28 @@ namespace Apache { namespace Hadoop { namespace Hive { -uint32_t ThriftHiveMetastore_create_database_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->database.read(iprot); this->__isset.database = true; } else { @@ -47,10 +47,10 @@ uint32_t ThriftHiveMetastore_create_database_args::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_create_database_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_args"); - xfer += oprot->writeFieldBegin("database", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->database.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -58,10 +58,10 @@ uint32_t ThriftHiveMetastore_create_database_args::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_create_database_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_pargs"); - xfer += oprot->writeFieldBegin("database", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("database", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->database)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -69,28 +69,28 @@ uint32_t ThriftHiveMetastore_create_database_pargs::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -98,7 +98,7 @@ uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -106,7 +106,7 @@ uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protoc } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -125,22 +125,22 @@ uint32_t ThriftHiveMetastore_create_database_result::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_create_database_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_database_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -149,28 +149,28 @@ uint32_t ThriftHiveMetastore_create_database_result::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -178,7 +178,7 @@ uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::proto } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -186,7 +186,7 @@ uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::proto } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -205,28 +205,28 @@ uint32_t ThriftHiveMetastore_create_database_presult::read(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_database_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -245,10 +245,10 @@ uint32_t ThriftHiveMetastore_get_database_args::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_database_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -256,10 +256,10 @@ uint32_t ThriftHiveMetastore_get_database_args::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_database_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_pargs"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -267,28 +267,28 @@ uint32_t ThriftHiveMetastore_get_database_pargs::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_database_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -296,7 +296,7 @@ uint32_t ThriftHiveMetastore_get_database_result::read(apache::thrift::protocol: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -304,7 +304,7 @@ uint32_t ThriftHiveMetastore_get_database_result::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -323,22 +323,22 @@ uint32_t ThriftHiveMetastore_get_database_result::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_database_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_database_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -347,28 +347,28 @@ uint32_t ThriftHiveMetastore_get_database_result::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_database_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -376,7 +376,7 @@ uint32_t ThriftHiveMetastore_get_database_presult::read(apache::thrift::protocol } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -384,7 +384,7 @@ uint32_t ThriftHiveMetastore_get_database_presult::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -403,28 +403,28 @@ uint32_t ThriftHiveMetastore_get_database_presult::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_drop_database_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_database_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -432,7 +432,7 @@ uint32_t ThriftHiveMetastore_drop_database_args::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deleteData); this->__isset.deleteData = true; } else { @@ -451,13 +451,13 @@ uint32_t ThriftHiveMetastore_drop_database_args::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_drop_database_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_database_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -465,13 +465,13 @@ uint32_t ThriftHiveMetastore_drop_database_args::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_drop_database_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_database_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_pargs"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -479,28 +479,28 @@ uint32_t ThriftHiveMetastore_drop_database_pargs::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_database_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -508,7 +508,7 @@ uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -516,7 +516,7 @@ uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -535,22 +535,22 @@ uint32_t ThriftHiveMetastore_drop_database_result::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_drop_database_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_database_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_database_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -559,28 +559,28 @@ uint32_t ThriftHiveMetastore_drop_database_result::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_database_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -588,7 +588,7 @@ uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -596,7 +596,7 @@ uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protoco } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -615,28 +615,28 @@ uint32_t ThriftHiveMetastore_drop_database_presult::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_databases_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->pattern); this->__isset.pattern = true; } else { @@ -655,10 +655,10 @@ uint32_t ThriftHiveMetastore_get_databases_args::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_databases_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_args"); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -666,10 +666,10 @@ uint32_t ThriftHiveMetastore_get_databases_args::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_databases_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_pargs"); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -677,32 +677,32 @@ uint32_t ThriftHiveMetastore_get_databases_pargs::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_databases_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size90; - apache::thrift::protocol::TType _etype93; + ::apache::thrift::protocol::TType _etype93; iprot->readListBegin(_etype93, _size90); this->success.resize(_size90); uint32_t _i94; @@ -718,7 +718,7 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(apache::thrift::protocol } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -737,16 +737,16 @@ uint32_t ThriftHiveMetastore_get_databases_result::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_databases_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_databases_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter95; for (_iter95 = this->success.begin(); _iter95 != this->success.end(); ++_iter95) { @@ -756,7 +756,7 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(apache::thrift::protoco } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -765,32 +765,32 @@ uint32_t ThriftHiveMetastore_get_databases_result::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_databases_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size96; - apache::thrift::protocol::TType _etype99; + ::apache::thrift::protocol::TType _etype99; iprot->readListBegin(_etype99, _size96); (*(this->success)).resize(_size96); uint32_t _i100; @@ -806,7 +806,7 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -825,22 +825,22 @@ uint32_t ThriftHiveMetastore_get_databases_presult::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_databases_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -857,7 +857,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_args::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_databases_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_args"); xfer += oprot->writeFieldStop(); @@ -865,7 +865,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_args::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_pargs"); xfer += oprot->writeFieldStop(); @@ -873,32 +873,32 @@ uint32_t ThriftHiveMetastore_get_all_databases_pargs::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_databases_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size101; - apache::thrift::protocol::TType _etype104; + ::apache::thrift::protocol::TType _etype104; iprot->readListBegin(_etype104, _size101); this->success.resize(_size101); uint32_t _i105; @@ -914,7 +914,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(apache::thrift::prot } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -933,16 +933,16 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_databases_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_databases_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter106; for (_iter106 = this->success.begin(); _iter106 != this->success.end(); ++_iter106) { @@ -952,7 +952,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(apache::thrift::pro } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -961,32 +961,32 @@ uint32_t ThriftHiveMetastore_get_all_databases_result::write(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_all_databases_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_databases_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size107; - apache::thrift::protocol::TType _etype110; + ::apache::thrift::protocol::TType _etype110; iprot->readListBegin(_etype110, _size107); (*(this->success)).resize(_size107); uint32_t _i111; @@ -1002,7 +1002,7 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(apache::thrift::pro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1021,28 +1021,28 @@ uint32_t ThriftHiveMetastore_get_all_databases_presult::read(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_type_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -1061,10 +1061,10 @@ uint32_t ThriftHiveMetastore_get_type_args::read(apache::thrift::protocol::TProt return xfer; } -uint32_t ThriftHiveMetastore_get_type_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1072,10 +1072,10 @@ uint32_t ThriftHiveMetastore_get_type_args::write(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_get_type_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_pargs"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1083,28 +1083,28 @@ uint32_t ThriftHiveMetastore_get_type_pargs::write(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_type_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -1112,7 +1112,7 @@ uint32_t ThriftHiveMetastore_get_type_result::read(apache::thrift::protocol::TPr } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1120,7 +1120,7 @@ uint32_t ThriftHiveMetastore_get_type_result::read(apache::thrift::protocol::TPr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1139,22 +1139,22 @@ uint32_t ThriftHiveMetastore_get_type_result::read(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_type_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1163,28 +1163,28 @@ uint32_t ThriftHiveMetastore_get_type_result::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_type_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -1192,7 +1192,7 @@ uint32_t ThriftHiveMetastore_get_type_presult::read(apache::thrift::protocol::TP } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1200,7 +1200,7 @@ uint32_t ThriftHiveMetastore_get_type_presult::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1219,28 +1219,28 @@ uint32_t ThriftHiveMetastore_get_type_presult::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_create_type_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->type.read(iprot); this->__isset.type = true; } else { @@ -1259,10 +1259,10 @@ uint32_t ThriftHiveMetastore_create_type_args::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_create_type_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_args"); - xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->type.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1270,10 +1270,10 @@ uint32_t ThriftHiveMetastore_create_type_args::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_create_type_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_pargs"); - xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->type)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1281,28 +1281,28 @@ uint32_t ThriftHiveMetastore_create_type_pargs::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->success); this->__isset.success = true; } else { @@ -1310,7 +1310,7 @@ uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1318,7 +1318,7 @@ uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1326,7 +1326,7 @@ uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol:: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -1345,26 +1345,26 @@ uint32_t ThriftHiveMetastore_create_type_result::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_type_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_type_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + 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 += 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1373,28 +1373,28 @@ uint32_t ThriftHiveMetastore_create_type_result::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { @@ -1402,7 +1402,7 @@ uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1410,7 +1410,7 @@ uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1418,7 +1418,7 @@ uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -1437,28 +1437,28 @@ uint32_t ThriftHiveMetastore_create_type_presult::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_drop_type_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_type_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->type); this->__isset.type = true; } else { @@ -1477,10 +1477,10 @@ uint32_t ThriftHiveMetastore_drop_type_args::read(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_drop_type_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_type_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_args"); - xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1488,10 +1488,10 @@ uint32_t ThriftHiveMetastore_drop_type_args::write(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_drop_type_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_type_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_pargs"); - xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->type))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1499,28 +1499,28 @@ uint32_t ThriftHiveMetastore_drop_type_pargs::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_type_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->success); this->__isset.success = true; } else { @@ -1528,7 +1528,7 @@ uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TP } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1536,7 +1536,7 @@ uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1555,22 +1555,22 @@ uint32_t ThriftHiveMetastore_drop_type_result::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_drop_type_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_type_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_type_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1579,28 +1579,28 @@ uint32_t ThriftHiveMetastore_drop_type_result::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_type_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { @@ -1608,7 +1608,7 @@ uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1616,7 +1616,7 @@ uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1635,28 +1635,28 @@ uint32_t ThriftHiveMetastore_drop_type_presult::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_all_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -1675,10 +1675,10 @@ uint32_t ThriftHiveMetastore_get_type_all_args::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_all_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1686,10 +1686,10 @@ uint32_t ThriftHiveMetastore_get_type_all_args::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_all_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_pargs"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1697,33 +1697,33 @@ uint32_t ThriftHiveMetastore_get_type_all_pargs::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_all_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); uint32_t _size112; - apache::thrift::protocol::TType _ktype113; - apache::thrift::protocol::TType _vtype114; + ::apache::thrift::protocol::TType _ktype113; + ::apache::thrift::protocol::TType _vtype114; iprot->readMapBegin(_ktype113, _vtype114, _size112); uint32_t _i116; for (_i116 = 0; _i116 < _size112; ++_i116) @@ -1741,7 +1741,7 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(apache::thrift::protocol: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1760,16 +1760,16 @@ uint32_t ThriftHiveMetastore_get_type_all_result::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_type_all_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_type_all_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, this->success.size()); std::map ::const_iterator _iter119; for (_iter119 = this->success.begin(); _iter119 != this->success.end(); ++_iter119) { @@ -1780,7 +1780,7 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(apache::thrift::protocol } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1789,33 +1789,33 @@ uint32_t ThriftHiveMetastore_get_type_all_result::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_type_all_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_type_all_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); uint32_t _size120; - apache::thrift::protocol::TType _ktype121; - apache::thrift::protocol::TType _vtype122; + ::apache::thrift::protocol::TType _ktype121; + ::apache::thrift::protocol::TType _vtype122; iprot->readMapBegin(_ktype121, _vtype122, _size120); uint32_t _i124; for (_i124 = 0; _i124 < _size120; ++_i124) @@ -1833,7 +1833,7 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(apache::thrift::protocol } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1852,28 +1852,28 @@ uint32_t ThriftHiveMetastore_get_type_all_presult::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_fields_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_fields_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -1881,7 +1881,7 @@ uint32_t ThriftHiveMetastore_get_fields_args::read(apache::thrift::protocol::TPr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->table_name); this->__isset.table_name = true; } else { @@ -1900,13 +1900,13 @@ uint32_t ThriftHiveMetastore_get_fields_args::read(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_fields_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_fields_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1914,13 +1914,13 @@ uint32_t ThriftHiveMetastore_get_fields_args::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_fields_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_fields_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1928,32 +1928,32 @@ uint32_t ThriftHiveMetastore_get_fields_pargs::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_fields_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size127; - apache::thrift::protocol::TType _etype130; + ::apache::thrift::protocol::TType _etype130; iprot->readListBegin(_etype130, _size127); this->success.resize(_size127); uint32_t _i131; @@ -1969,7 +1969,7 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -1977,7 +1977,7 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -1985,7 +1985,7 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::T } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2004,16 +2004,16 @@ uint32_t ThriftHiveMetastore_get_fields_result::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_fields_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_fields_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_fields_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter132; for (_iter132 = this->success.begin(); _iter132 != this->success.end(); ++_iter132) { @@ -2023,15 +2023,15 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(apache::thrift::protocol:: } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -2040,32 +2040,32 @@ uint32_t ThriftHiveMetastore_get_fields_result::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_fields_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size133; - apache::thrift::protocol::TType _etype136; + ::apache::thrift::protocol::TType _etype136; iprot->readListBegin(_etype136, _size133); (*(this->success)).resize(_size133); uint32_t _i137; @@ -2081,7 +2081,7 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2089,7 +2089,7 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -2097,7 +2097,7 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol:: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2116,28 +2116,28 @@ uint32_t ThriftHiveMetastore_get_fields_presult::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_schema_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_schema_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -2145,7 +2145,7 @@ uint32_t ThriftHiveMetastore_get_schema_args::read(apache::thrift::protocol::TPr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->table_name); this->__isset.table_name = true; } else { @@ -2164,13 +2164,13 @@ uint32_t ThriftHiveMetastore_get_schema_args::read(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_schema_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_schema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->table_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2178,13 +2178,13 @@ uint32_t ThriftHiveMetastore_get_schema_args::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_schema_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_schema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("table_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("table_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->table_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2192,32 +2192,32 @@ uint32_t ThriftHiveMetastore_get_schema_pargs::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_schema_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size138; - apache::thrift::protocol::TType _etype141; + ::apache::thrift::protocol::TType _etype141; iprot->readListBegin(_etype141, _size138); this->success.resize(_size138); uint32_t _i142; @@ -2233,7 +2233,7 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2241,7 +2241,7 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -2249,7 +2249,7 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::T } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2268,16 +2268,16 @@ uint32_t ThriftHiveMetastore_get_schema_result::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_schema_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_schema_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_schema_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter143; for (_iter143 = this->success.begin(); _iter143 != this->success.end(); ++_iter143) { @@ -2287,15 +2287,15 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(apache::thrift::protocol:: } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -2304,32 +2304,32 @@ uint32_t ThriftHiveMetastore_get_schema_result::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_schema_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size144; - apache::thrift::protocol::TType _etype147; + ::apache::thrift::protocol::TType _etype147; iprot->readListBegin(_etype147, _size144); (*(this->success)).resize(_size144); uint32_t _i148; @@ -2345,7 +2345,7 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2353,7 +2353,7 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -2361,7 +2361,7 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol:: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2380,28 +2380,28 @@ uint32_t ThriftHiveMetastore_get_schema_presult::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_table_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->tbl.read(iprot); this->__isset.tbl = true; } else { @@ -2420,10 +2420,10 @@ uint32_t ThriftHiveMetastore_create_table_args::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_create_table_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_args"); - xfer += oprot->writeFieldBegin("tbl", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->tbl.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2431,10 +2431,10 @@ uint32_t ThriftHiveMetastore_create_table_args::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_create_table_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_pargs"); - xfer += oprot->writeFieldBegin("tbl", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("tbl", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->tbl)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2442,28 +2442,28 @@ uint32_t ThriftHiveMetastore_create_table_pargs::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2471,7 +2471,7 @@ uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -2479,7 +2479,7 @@ uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2487,7 +2487,7 @@ uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol: } break; case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o4.read(iprot); this->__isset.o4 = true; } else { @@ -2506,26 +2506,26 @@ uint32_t ThriftHiveMetastore_create_table_result::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_create_table_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_create_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_create_table_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += 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 += 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 += oprot->writeFieldBegin("o4", ::apache::thrift::protocol::T_STRUCT, 4); xfer += this->o4.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -2534,28 +2534,28 @@ uint32_t ThriftHiveMetastore_create_table_result::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_create_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2563,7 +2563,7 @@ uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -2571,7 +2571,7 @@ uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2579,7 +2579,7 @@ uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol } break; case 4: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o4.read(iprot); this->__isset.o4 = true; } else { @@ -2598,28 +2598,28 @@ uint32_t ThriftHiveMetastore_create_table_presult::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_drop_table_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbname); this->__isset.dbname = true; } else { @@ -2627,7 +2627,7 @@ uint32_t ThriftHiveMetastore_drop_table_args::read(apache::thrift::protocol::TPr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -2635,7 +2635,7 @@ uint32_t ThriftHiveMetastore_drop_table_args::read(apache::thrift::protocol::TPr } break; case 3: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deleteData); this->__isset.deleteData = true; } else { @@ -2654,16 +2654,16 @@ uint32_t ThriftHiveMetastore_drop_table_args::read(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_drop_table_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_args"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2671,16 +2671,16 @@ uint32_t ThriftHiveMetastore_drop_table_args::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_drop_table_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_pargs"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2688,28 +2688,28 @@ uint32_t ThriftHiveMetastore_drop_table_pargs::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_drop_table_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2717,7 +2717,7 @@ uint32_t ThriftHiveMetastore_drop_table_result::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2736,18 +2736,18 @@ uint32_t ThriftHiveMetastore_drop_table_result::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_drop_table_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_table_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.o3) { - xfer += oprot->writeFieldBegin("o3", apache::thrift::protocol::T_STRUCT, 2); + xfer += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -2756,28 +2756,28 @@ uint32_t ThriftHiveMetastore_drop_table_result::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_drop_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2785,7 +2785,7 @@ uint32_t ThriftHiveMetastore_drop_table_presult::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -2804,28 +2804,28 @@ uint32_t ThriftHiveMetastore_drop_table_presult::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_tables_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -2833,7 +2833,7 @@ uint32_t ThriftHiveMetastore_get_tables_args::read(apache::thrift::protocol::TPr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->pattern); this->__isset.pattern = true; } else { @@ -2852,13 +2852,13 @@ uint32_t ThriftHiveMetastore_get_tables_args::read(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_tables_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->pattern); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2866,13 +2866,13 @@ uint32_t ThriftHiveMetastore_get_tables_args::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_tables_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("pattern", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("pattern", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->pattern))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -2880,32 +2880,32 @@ uint32_t ThriftHiveMetastore_get_tables_pargs::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size149; - apache::thrift::protocol::TType _etype152; + ::apache::thrift::protocol::TType _etype152; iprot->readListBegin(_etype152, _size149); this->success.resize(_size149); uint32_t _i153; @@ -2921,7 +2921,7 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -2940,16 +2940,16 @@ uint32_t ThriftHiveMetastore_get_tables_result::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_tables_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter154; for (_iter154 = this->success.begin(); _iter154 != this->success.end(); ++_iter154) { @@ -2959,7 +2959,7 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol:: } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -2968,32 +2968,32 @@ uint32_t ThriftHiveMetastore_get_tables_result::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size155; - apache::thrift::protocol::TType _etype158; + ::apache::thrift::protocol::TType _etype158; iprot->readListBegin(_etype158, _size155); (*(this->success)).resize(_size155); uint32_t _i159; @@ -3009,7 +3009,7 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3028,28 +3028,28 @@ uint32_t ThriftHiveMetastore_get_tables_presult::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_tables_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -3068,10 +3068,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_args::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_tables_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->db_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3079,10 +3079,10 @@ uint32_t ThriftHiveMetastore_get_all_tables_args::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("db_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->db_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3090,32 +3090,32 @@ uint32_t ThriftHiveMetastore_get_all_tables_pargs::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_tables_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size160; - apache::thrift::protocol::TType _etype163; + ::apache::thrift::protocol::TType _etype163; iprot->readListBegin(_etype163, _size160); this->success.resize(_size160); uint32_t _i164; @@ -3131,7 +3131,7 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3150,16 +3150,16 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_all_tables_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_all_tables_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter165; for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165) { @@ -3169,7 +3169,7 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(apache::thrift::protoc } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -3178,32 +3178,32 @@ uint32_t ThriftHiveMetastore_get_all_tables_result::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_all_tables_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_all_tables_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size166; - apache::thrift::protocol::TType _etype169; + ::apache::thrift::protocol::TType _etype169; iprot->readListBegin(_etype169, _size166); (*(this->success)).resize(_size166); uint32_t _i170; @@ -3219,7 +3219,7 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(apache::thrift::protoc } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3238,28 +3238,28 @@ uint32_t ThriftHiveMetastore_get_all_tables_presult::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_table_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbname); this->__isset.dbname = true; } else { @@ -3267,7 +3267,7 @@ uint32_t ThriftHiveMetastore_get_table_args::read(apache::thrift::protocol::TPro } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -3286,13 +3286,13 @@ uint32_t ThriftHiveMetastore_get_table_args::read(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_get_table_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_args"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3300,13 +3300,13 @@ uint32_t ThriftHiveMetastore_get_table_args::write(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_get_table_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_pargs"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3314,28 +3314,28 @@ uint32_t ThriftHiveMetastore_get_table_pargs::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_table_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -3343,7 +3343,7 @@ uint32_t ThriftHiveMetastore_get_table_result::read(apache::thrift::protocol::TP } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3351,7 +3351,7 @@ uint32_t ThriftHiveMetastore_get_table_result::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3370,22 +3370,22 @@ uint32_t ThriftHiveMetastore_get_table_result::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_table_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_table_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -3394,28 +3394,28 @@ uint32_t ThriftHiveMetastore_get_table_result::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -3423,7 +3423,7 @@ uint32_t ThriftHiveMetastore_get_table_presult::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3431,7 +3431,7 @@ uint32_t ThriftHiveMetastore_get_table_presult::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3450,28 +3450,28 @@ uint32_t ThriftHiveMetastore_get_table_presult::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_alter_table_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_table_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbname); this->__isset.dbname = true; } else { @@ -3479,7 +3479,7 @@ uint32_t ThriftHiveMetastore_alter_table_args::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -3487,7 +3487,7 @@ uint32_t ThriftHiveMetastore_alter_table_args::read(apache::thrift::protocol::TP } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->new_tbl.read(iprot); this->__isset.new_tbl = true; } else { @@ -3506,16 +3506,16 @@ uint32_t ThriftHiveMetastore_alter_table_args::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_alter_table_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_table_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_args"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->dbname); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_tbl", apache::thrift::protocol::T_STRUCT, 3); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_tbl.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3523,16 +3523,16 @@ uint32_t ThriftHiveMetastore_alter_table_args::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_alter_table_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_table_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_pargs"); - xfer += oprot->writeFieldBegin("dbname", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("dbname", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->dbname))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tbl_name", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_tbl", apache::thrift::protocol::T_STRUCT, 3); + xfer += oprot->writeFieldBegin("new_tbl", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_tbl)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3540,28 +3540,28 @@ uint32_t ThriftHiveMetastore_alter_table_pargs::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_alter_table_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_table_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3569,7 +3569,7 @@ uint32_t ThriftHiveMetastore_alter_table_result::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3588,18 +3588,18 @@ uint32_t ThriftHiveMetastore_alter_table_result::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_alter_table_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_table_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_table_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -3608,28 +3608,28 @@ uint32_t ThriftHiveMetastore_alter_table_result::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_alter_table_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_table_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3637,7 +3637,7 @@ uint32_t ThriftHiveMetastore_alter_table_presult::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3656,28 +3656,28 @@ uint32_t ThriftHiveMetastore_alter_table_presult::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_add_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->new_part.read(iprot); this->__isset.new_part = true; } else { @@ -3696,10 +3696,10 @@ uint32_t ThriftHiveMetastore_add_partition_args::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_add_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_args"); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3707,10 +3707,10 @@ uint32_t ThriftHiveMetastore_add_partition_args::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_add_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_pargs"); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -3718,28 +3718,28 @@ uint32_t ThriftHiveMetastore_add_partition_pargs::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_add_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -3747,7 +3747,7 @@ uint32_t ThriftHiveMetastore_add_partition_result::read(apache::thrift::protocol } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3755,7 +3755,7 @@ uint32_t ThriftHiveMetastore_add_partition_result::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3763,7 +3763,7 @@ uint32_t ThriftHiveMetastore_add_partition_result::read(apache::thrift::protocol } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -3782,26 +3782,26 @@ uint32_t ThriftHiveMetastore_add_partition_result::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_add_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_partition_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -3810,28 +3810,28 @@ uint32_t ThriftHiveMetastore_add_partition_result::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_add_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -3839,7 +3839,7 @@ uint32_t ThriftHiveMetastore_add_partition_presult::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -3847,7 +3847,7 @@ uint32_t ThriftHiveMetastore_add_partition_presult::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -3855,7 +3855,7 @@ uint32_t ThriftHiveMetastore_add_partition_presult::read(apache::thrift::protoco } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -3874,28 +3874,28 @@ uint32_t ThriftHiveMetastore_add_partition_presult::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_append_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -3903,7 +3903,7 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -3911,11 +3911,11 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(apache::thrift::protoco } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); uint32_t _size171; - apache::thrift::protocol::TType _etype174; + ::apache::thrift::protocol::TType _etype174; iprot->readListBegin(_etype174, _size171); this->part_vals.resize(_size171); uint32_t _i175; @@ -3942,18 +3942,18 @@ uint32_t ThriftHiveMetastore_append_partition_args::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_append_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); std::vector ::const_iterator _iter176; for (_iter176 = this->part_vals.begin(); _iter176 != this->part_vals.end(); ++_iter176) { @@ -3967,18 +3967,18 @@ uint32_t ThriftHiveMetastore_append_partition_args::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_append_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); std::vector ::const_iterator _iter177; for (_iter177 = (*(this->part_vals)).begin(); _iter177 != (*(this->part_vals)).end(); ++_iter177) { @@ -3992,28 +3992,28 @@ uint32_t ThriftHiveMetastore_append_partition_pargs::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_append_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -4021,7 +4021,7 @@ uint32_t ThriftHiveMetastore_append_partition_result::read(apache::thrift::proto } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4029,7 +4029,7 @@ uint32_t ThriftHiveMetastore_append_partition_result::read(apache::thrift::proto } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4037,7 +4037,7 @@ uint32_t ThriftHiveMetastore_append_partition_result::read(apache::thrift::proto } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -4056,26 +4056,26 @@ uint32_t ThriftHiveMetastore_append_partition_result::read(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_append_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -4084,28 +4084,28 @@ uint32_t ThriftHiveMetastore_append_partition_result::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_append_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -4113,7 +4113,7 @@ uint32_t ThriftHiveMetastore_append_partition_presult::read(apache::thrift::prot } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4121,7 +4121,7 @@ uint32_t ThriftHiveMetastore_append_partition_presult::read(apache::thrift::prot } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4129,7 +4129,7 @@ uint32_t ThriftHiveMetastore_append_partition_presult::read(apache::thrift::prot } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -4148,28 +4148,28 @@ uint32_t ThriftHiveMetastore_append_partition_presult::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -4177,7 +4177,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(apache::thrift: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -4185,7 +4185,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(apache::thrift: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->part_name); this->__isset.part_name = true; } else { @@ -4204,16 +4204,16 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4221,16 +4221,16 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_args::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4238,28 +4238,28 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_pargs::write(apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -4267,7 +4267,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(apache::thrif } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4275,7 +4275,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(apache::thrif } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4283,7 +4283,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(apache::thrif } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -4302,26 +4302,26 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_result::read(apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_append_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_append_partition_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -4330,28 +4330,28 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_result::write(apache::thri return xfer; } -uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -4359,7 +4359,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(apache::thri } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4367,7 +4367,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(apache::thri } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4375,7 +4375,7 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(apache::thri } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -4394,28 +4394,28 @@ uint32_t ThriftHiveMetastore_append_partition_by_name_presult::read(apache::thri return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -4423,7 +4423,7 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -4431,11 +4431,11 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol: } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); uint32_t _size178; - apache::thrift::protocol::TType _etype181; + ::apache::thrift::protocol::TType _etype181; iprot->readListBegin(_etype181, _size178); this->part_vals.resize(_size178); uint32_t _i182; @@ -4451,7 +4451,7 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol: } break; case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deleteData); this->__isset.deleteData = true; } else { @@ -4470,18 +4470,18 @@ uint32_t ThriftHiveMetastore_drop_partition_args::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); std::vector ::const_iterator _iter183; for (_iter183 = this->part_vals.begin(); _iter183 != this->part_vals.end(); ++_iter183) { @@ -4490,7 +4490,7 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(apache::thrift::protocol xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4498,18 +4498,18 @@ uint32_t ThriftHiveMetastore_drop_partition_args::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); std::vector ::const_iterator _iter184; for (_iter184 = (*(this->part_vals)).begin(); _iter184 != (*(this->part_vals)).end(); ++_iter184) { @@ -4518,7 +4518,7 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(apache::thrift::protoco xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4526,28 +4526,28 @@ uint32_t ThriftHiveMetastore_drop_partition_pargs::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->success); this->__isset.success = true; } else { @@ -4555,7 +4555,7 @@ uint32_t ThriftHiveMetastore_drop_partition_result::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4563,7 +4563,7 @@ uint32_t ThriftHiveMetastore_drop_partition_result::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4582,22 +4582,22 @@ uint32_t ThriftHiveMetastore_drop_partition_result::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -4606,28 +4606,28 @@ uint32_t ThriftHiveMetastore_drop_partition_result::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { @@ -4635,7 +4635,7 @@ uint32_t ThriftHiveMetastore_drop_partition_presult::read(apache::thrift::protoc } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4643,7 +4643,7 @@ uint32_t ThriftHiveMetastore_drop_partition_presult::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4662,28 +4662,28 @@ uint32_t ThriftHiveMetastore_drop_partition_presult::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -4691,7 +4691,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(apache::thrift::p } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -4699,7 +4699,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(apache::thrift::p } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->part_name); this->__isset.part_name = true; } else { @@ -4707,7 +4707,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(apache::thrift::p } break; case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deleteData); this->__isset.deleteData = true; } else { @@ -4726,19 +4726,19 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::read(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4746,19 +4746,19 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_args::write(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -4766,28 +4766,28 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_pargs::write(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->success); this->__isset.success = true; } else { @@ -4795,7 +4795,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(apache::thrift: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4803,7 +4803,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(apache::thrift: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4822,22 +4822,22 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_result::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_partition_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -4846,28 +4846,28 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_result::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { @@ -4875,7 +4875,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(apache::thrift } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -4883,7 +4883,7 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(apache::thrift } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -4902,28 +4902,28 @@ uint32_t ThriftHiveMetastore_drop_partition_by_name_presult::read(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -4931,7 +4931,7 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -4939,11 +4939,11 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(apache::thrift::protocol:: } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); uint32_t _size185; - apache::thrift::protocol::TType _etype188; + ::apache::thrift::protocol::TType _etype188; iprot->readListBegin(_etype188, _size185); this->part_vals.resize(_size185); uint32_t _i189; @@ -4970,18 +4970,18 @@ uint32_t ThriftHiveMetastore_get_partition_args::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); std::vector ::const_iterator _iter190; for (_iter190 = this->part_vals.begin(); _iter190 != this->part_vals.end(); ++_iter190) { @@ -4995,18 +4995,18 @@ uint32_t ThriftHiveMetastore_get_partition_args::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); std::vector ::const_iterator _iter191; for (_iter191 = (*(this->part_vals)).begin(); _iter191 != (*(this->part_vals)).end(); ++_iter191) { @@ -5020,28 +5020,28 @@ uint32_t ThriftHiveMetastore_get_partition_pargs::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -5049,7 +5049,7 @@ uint32_t ThriftHiveMetastore_get_partition_result::read(apache::thrift::protocol } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5057,7 +5057,7 @@ uint32_t ThriftHiveMetastore_get_partition_result::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5076,22 +5076,22 @@ uint32_t ThriftHiveMetastore_get_partition_result::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5100,28 +5100,28 @@ uint32_t ThriftHiveMetastore_get_partition_result::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -5129,7 +5129,7 @@ uint32_t ThriftHiveMetastore_get_partition_presult::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5137,7 +5137,7 @@ uint32_t ThriftHiveMetastore_get_partition_presult::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5156,28 +5156,28 @@ uint32_t ThriftHiveMetastore_get_partition_presult::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -5185,7 +5185,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::pr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -5193,7 +5193,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::pr } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->part_name); this->__isset.part_name = true; } else { @@ -5212,16 +5212,16 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::read(apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5229,16 +5229,16 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_args::write(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->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->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5246,28 +5246,28 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_pargs::write(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -5275,7 +5275,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5283,7 +5283,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5302,22 +5302,22 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_result::read(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5326,28 +5326,28 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_result::write(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -5355,7 +5355,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5363,7 +5363,7 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5382,28 +5382,28 @@ uint32_t ThriftHiveMetastore_get_partition_by_name_presult::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -5411,7 +5411,7 @@ uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -5419,7 +5419,7 @@ uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol: } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; } else { @@ -5438,16 +5438,16 @@ uint32_t ThriftHiveMetastore_get_partitions_args::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5455,16 +5455,16 @@ uint32_t ThriftHiveMetastore_get_partitions_args::write(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5472,32 +5472,32 @@ uint32_t ThriftHiveMetastore_get_partitions_pargs::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size192; - apache::thrift::protocol::TType _etype195; + ::apache::thrift::protocol::TType _etype195; iprot->readListBegin(_etype195, _size192); this->success.resize(_size192); uint32_t _i196; @@ -5513,7 +5513,7 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protoco } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5521,7 +5521,7 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5540,16 +5540,16 @@ uint32_t ThriftHiveMetastore_get_partitions_result::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter197; for (_iter197 = this->success.begin(); _iter197 != this->success.end(); ++_iter197) { @@ -5559,11 +5559,11 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protoc } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5572,32 +5572,32 @@ uint32_t ThriftHiveMetastore_get_partitions_result::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size198; - apache::thrift::protocol::TType _etype201; + ::apache::thrift::protocol::TType _etype201; iprot->readListBegin(_etype201, _size198); (*(this->success)).resize(_size198); uint32_t _i202; @@ -5613,7 +5613,7 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protoc } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -5621,7 +5621,7 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5640,28 +5640,28 @@ uint32_t ThriftHiveMetastore_get_partitions_presult::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -5669,7 +5669,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::prot } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -5677,7 +5677,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::prot } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; } else { @@ -5696,16 +5696,16 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5713,16 +5713,16 @@ uint32_t ThriftHiveMetastore_get_partition_names_args::write(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5730,32 +5730,32 @@ uint32_t ThriftHiveMetastore_get_partition_names_pargs::write(apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size203; - apache::thrift::protocol::TType _etype206; + ::apache::thrift::protocol::TType _etype206; iprot->readListBegin(_etype206, _size203); this->success.resize(_size203); uint32_t _i207; @@ -5771,7 +5771,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::pr } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5790,16 +5790,16 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::read(apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter208; for (_iter208 = this->success.begin(); _iter208 != this->success.end(); ++_iter208) { @@ -5809,7 +5809,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::p } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -5818,32 +5818,32 @@ uint32_t ThriftHiveMetastore_get_partition_names_result::write(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size209; - apache::thrift::protocol::TType _etype212; + ::apache::thrift::protocol::TType _etype212; iprot->readListBegin(_etype212, _size209); (*(this->success)).resize(_size209); uint32_t _i213; @@ -5859,7 +5859,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::p } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -5878,28 +5878,28 @@ uint32_t ThriftHiveMetastore_get_partition_names_presult::read(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -5907,7 +5907,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -5915,11 +5915,11 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protoc } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); uint32_t _size214; - apache::thrift::protocol::TType _etype217; + ::apache::thrift::protocol::TType _etype217; iprot->readListBegin(_etype217, _size214); this->part_vals.resize(_size214); uint32_t _i218; @@ -5935,7 +5935,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protoc } break; case 4: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; } else { @@ -5954,18 +5954,18 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); std::vector ::const_iterator _iter219; for (_iter219 = this->part_vals.begin(); _iter219 != this->part_vals.end(); ++_iter219) { @@ -5974,7 +5974,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::proto xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -5982,18 +5982,18 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_args::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); std::vector ::const_iterator _iter220; for (_iter220 = (*(this->part_vals)).begin(); _iter220 != (*(this->part_vals)).end(); ++_iter220) { @@ -6002,7 +6002,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(apache::thrift::prot xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6010,32 +6010,32 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_pargs::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size221; - apache::thrift::protocol::TType _etype224; + ::apache::thrift::protocol::TType _etype224; iprot->readListBegin(_etype224, _size221); this->success.resize(_size221); uint32_t _i225; @@ -6051,7 +6051,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::prot } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6070,16 +6070,16 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_ps_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter226; for (_iter226 = this->success.begin(); _iter226 != this->success.end(); ++_iter226) { @@ -6089,7 +6089,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::pro } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -6098,32 +6098,32 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_result::write(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size227; - apache::thrift::protocol::TType _etype230; + ::apache::thrift::protocol::TType _etype230; iprot->readListBegin(_etype230, _size227); (*(this->success)).resize(_size227); uint32_t _i231; @@ -6139,7 +6139,7 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::pro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6158,28 +6158,28 @@ uint32_t ThriftHiveMetastore_get_partitions_ps_presult::read(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -6187,7 +6187,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::p } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -6195,11 +6195,11 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::p } break; case 3: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->part_vals.clear(); uint32_t _size232; - apache::thrift::protocol::TType _etype235; + ::apache::thrift::protocol::TType _etype235; iprot->readListBegin(_etype235, _size232); this->part_vals.resize(_size232); uint32_t _i236; @@ -6215,7 +6215,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::p } break; case 4: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; } else { @@ -6234,18 +6234,18 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::read(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->part_vals.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->part_vals.size()); std::vector ::const_iterator _iter237; for (_iter237 = this->part_vals.begin(); _iter237 != this->part_vals.end(); ++_iter237) { @@ -6254,7 +6254,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift:: xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6262,18 +6262,18 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_args::write(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("part_vals", apache::thrift::protocol::T_LIST, 3); + xfer += oprot->writeFieldBegin("part_vals", ::apache::thrift::protocol::T_LIST, 3); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, (*(this->part_vals)).size()); std::vector ::const_iterator _iter238; for (_iter238 = (*(this->part_vals)).begin(); _iter238 != (*(this->part_vals)).end(); ++_iter238) { @@ -6282,7 +6282,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(apache::thrift: xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6290,32 +6290,32 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_pargs::write(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size239; - apache::thrift::protocol::TType _etype242; + ::apache::thrift::protocol::TType _etype242; iprot->readListBegin(_etype242, _size239); this->success.resize(_size239); uint32_t _i243; @@ -6331,7 +6331,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6350,16 +6350,16 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partition_names_ps_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter244; for (_iter244 = this->success.begin(); _iter244 != this->success.end(); ++_iter244) { @@ -6369,7 +6369,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -6378,32 +6378,32 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_result::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size245; - apache::thrift::protocol::TType _etype248; + ::apache::thrift::protocol::TType _etype248; iprot->readListBegin(_etype248, _size245); (*(this->success)).resize(_size245); uint32_t _i249; @@ -6419,7 +6419,7 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6438,28 +6438,28 @@ uint32_t ThriftHiveMetastore_get_partition_names_ps_presult::read(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -6467,7 +6467,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -6475,7 +6475,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift: } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->filter); this->__isset.filter = true; } else { @@ -6483,7 +6483,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift: } break; case 4: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_parts); this->__isset.max_parts = true; } else { @@ -6502,19 +6502,19 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->filter); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16(this->max_parts); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6522,19 +6522,19 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_args::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("filter", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("filter", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->filter))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_parts", apache::thrift::protocol::T_I16, 4); + xfer += oprot->writeFieldBegin("max_parts", ::apache::thrift::protocol::T_I16, 4); xfer += oprot->writeI16((*(this->max_parts))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6542,32 +6542,32 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_pargs::write(apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size250; - apache::thrift::protocol::TType _etype253; + ::apache::thrift::protocol::TType _etype253; iprot->readListBegin(_etype253, _size250); this->success.resize(_size250); uint32_t _i254; @@ -6583,7 +6583,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrif } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6591,7 +6591,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrif } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -6610,16 +6610,16 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::read(apache::thrif return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_partitions_by_filter_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter255; for (_iter255 = this->success.begin(); _iter255 != this->success.end(); ++_iter255) { @@ -6629,11 +6629,11 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(apache::thri } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -6642,32 +6642,32 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_result::write(apache::thri return xfer; } -uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size256; - apache::thrift::protocol::TType _etype259; + ::apache::thrift::protocol::TType _etype259; iprot->readListBegin(_etype259, _size256); (*(this->success)).resize(_size256); uint32_t _i260; @@ -6683,7 +6683,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thri } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6691,7 +6691,7 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thri } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -6710,28 +6710,28 @@ uint32_t ThriftHiveMetastore_get_partitions_by_filter_presult::read(apache::thri return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -6739,7 +6739,7 @@ uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -6747,7 +6747,7 @@ uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->new_part.read(iprot); this->__isset.new_part = true; } else { @@ -6766,16 +6766,16 @@ uint32_t ThriftHiveMetastore_alter_partition_args::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->new_part.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6783,16 +6783,16 @@ uint32_t ThriftHiveMetastore_alter_partition_args::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("new_part", apache::thrift::protocol::T_STRUCT, 3); + xfer += oprot->writeFieldBegin("new_part", ::apache::thrift::protocol::T_STRUCT, 3); xfer += (*(this->new_part)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6800,28 +6800,28 @@ uint32_t ThriftHiveMetastore_alter_partition_pargs::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6829,7 +6829,7 @@ uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -6848,18 +6848,18 @@ uint32_t ThriftHiveMetastore_alter_partition_result::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_alter_partition_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_alter_partition_result"); if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -6868,28 +6868,28 @@ uint32_t ThriftHiveMetastore_alter_partition_result::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_alter_partition_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -6897,7 +6897,7 @@ uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::proto } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -6916,28 +6916,28 @@ uint32_t ThriftHiveMetastore_alter_partition_presult::read(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -6945,7 +6945,7 @@ uint32_t ThriftHiveMetastore_get_config_value_args::read(apache::thrift::protoco } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->defaultValue); this->__isset.defaultValue = true; } else { @@ -6964,13 +6964,13 @@ uint32_t ThriftHiveMetastore_get_config_value_args::read(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_args"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->defaultValue); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6978,13 +6978,13 @@ uint32_t ThriftHiveMetastore_get_config_value_args::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_pargs"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("defaultValue", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("defaultValue", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->defaultValue))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -6992,28 +6992,28 @@ uint32_t ThriftHiveMetastore_get_config_value_pargs::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->success); this->__isset.success = true; } else { @@ -7021,7 +7021,7 @@ uint32_t ThriftHiveMetastore_get_config_value_result::read(apache::thrift::proto } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7040,18 +7040,18 @@ uint32_t ThriftHiveMetastore_get_config_value_result::read(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_config_value_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_config_value_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); + 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 += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -7060,28 +7060,28 @@ uint32_t ThriftHiveMetastore_get_config_value_result::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_config_value_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString((*(this->success))); this->__isset.success = true; } else { @@ -7089,7 +7089,7 @@ uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::prot } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7108,28 +7108,28 @@ uint32_t ThriftHiveMetastore_get_config_value_presult::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->part_name); this->__isset.part_name = true; } else { @@ -7148,10 +7148,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_args::read(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_args"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7159,10 +7159,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_args::write(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_pargs"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7170,32 +7170,32 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_pargs::write(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size261; - apache::thrift::protocol::TType _etype264; + ::apache::thrift::protocol::TType _etype264; iprot->readListBegin(_etype264, _size261); this->success.resize(_size261); uint32_t _i265; @@ -7211,7 +7211,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(apache::thrift: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7230,16 +7230,16 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_vals_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter266; for (_iter266 = this->success.begin(); _iter266 != this->success.end(); ++_iter266) { @@ -7249,7 +7249,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -7258,32 +7258,32 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_result::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size267; - apache::thrift::protocol::TType _etype270; + ::apache::thrift::protocol::TType _etype270; iprot->readListBegin(_etype270, _size267); (*(this->success)).resize(_size267); uint32_t _i271; @@ -7299,7 +7299,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7318,28 +7318,28 @@ uint32_t ThriftHiveMetastore_partition_name_to_vals_presult::read(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->part_name); this->__isset.part_name = true; } else { @@ -7358,10 +7358,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_args::read(apache::thrift::p return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_args"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->part_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7369,10 +7369,10 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_args::write(apache::thrift:: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_pargs"); - xfer += oprot->writeFieldBegin("part_name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("part_name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->part_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7380,33 +7380,33 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_pargs::write(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->success.clear(); uint32_t _size272; - apache::thrift::protocol::TType _ktype273; - apache::thrift::protocol::TType _vtype274; + ::apache::thrift::protocol::TType _ktype273; + ::apache::thrift::protocol::TType _vtype274; iprot->readMapBegin(_ktype273, _vtype274, _size272); uint32_t _i276; for (_i276 = 0; _i276 < _size272; ++_i276) @@ -7424,7 +7424,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7443,16 +7443,16 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::read(apache::thrift: return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_partition_name_to_spec_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->success.size()); std::map ::const_iterator _iter279; for (_iter279 = this->success.begin(); _iter279 != this->success.end(); ++_iter279) { @@ -7463,7 +7463,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o1", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o1.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -7472,33 +7472,33 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_result::write(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { (*(this->success)).clear(); uint32_t _size280; - apache::thrift::protocol::TType _ktype281; - apache::thrift::protocol::TType _vtype282; + ::apache::thrift::protocol::TType _ktype281; + ::apache::thrift::protocol::TType _vtype282; iprot->readMapBegin(_ktype281, _vtype282, _size280); uint32_t _i284; for (_i284 = 0; _i284 < _size280; ++_i284) @@ -7516,7 +7516,7 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7535,28 +7535,28 @@ uint32_t ThriftHiveMetastore_partition_name_to_spec_presult::read(apache::thrift return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->new_index.read(iprot); this->__isset.new_index = true; } else { @@ -7564,7 +7564,7 @@ uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TPro } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->index_table.read(iprot); this->__isset.index_table = true; } else { @@ -7583,13 +7583,13 @@ uint32_t ThriftHiveMetastore_add_index_args::read(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHiveMetastore_add_index_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_args"); - xfer += oprot->writeFieldBegin("new_index", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->new_index.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->index_table.write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7597,13 +7597,13 @@ uint32_t ThriftHiveMetastore_add_index_args::write(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHiveMetastore_add_index_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_pargs"); - xfer += oprot->writeFieldBegin("new_index", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("new_index", ::apache::thrift::protocol::T_STRUCT, 1); xfer += (*(this->new_index)).write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_table", apache::thrift::protocol::T_STRUCT, 2); + xfer += oprot->writeFieldBegin("index_table", ::apache::thrift::protocol::T_STRUCT, 2); xfer += (*(this->index_table)).write(oprot); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7611,28 +7611,28 @@ uint32_t ThriftHiveMetastore_add_index_pargs::write(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -7640,7 +7640,7 @@ uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TP } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7648,7 +7648,7 @@ uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -7656,7 +7656,7 @@ uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TP } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -7675,26 +7675,26 @@ uint32_t ThriftHiveMetastore_add_index_result::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_add_index_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_add_index_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_add_index_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += 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 += oprot->writeFieldBegin("o3", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->o3.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -7703,28 +7703,28 @@ uint32_t ThriftHiveMetastore_add_index_result::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_add_index_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -7732,7 +7732,7 @@ uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::T } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7740,7 +7740,7 @@ uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::T } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -7748,7 +7748,7 @@ uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::T } break; case 3: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o3.read(iprot); this->__isset.o3 = true; } else { @@ -7767,28 +7767,28 @@ uint32_t ThriftHiveMetastore_add_index_presult::read(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -7796,7 +7796,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::proto } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -7804,7 +7804,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::proto } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->index_name); this->__isset.index_name = true; } else { @@ -7812,7 +7812,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::proto } break; case 4: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deleteData); this->__isset.deleteData = true; } else { @@ -7831,19 +7831,19 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::read(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool(this->deleteData); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7851,19 +7851,19 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_args::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deleteData", apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeFieldBegin("deleteData", ::apache::thrift::protocol::T_BOOL, 4); xfer += oprot->writeBool((*(this->deleteData))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -7871,28 +7871,28 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_pargs::write(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->success); this->__isset.success = true; } else { @@ -7900,7 +7900,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::pro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7908,7 +7908,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::pro } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -7927,22 +7927,22 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_result::read(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_drop_index_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_BOOL, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -7951,28 +7951,28 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_result::write(apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool((*(this->success))); this->__isset.success = true; } else { @@ -7980,7 +7980,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::pr } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -7988,7 +7988,7 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::pr } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8007,28 +8007,28 @@ uint32_t ThriftHiveMetastore_drop_index_by_name_presult::read(apache::thrift::pr return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_by_name_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -8036,7 +8036,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protoc } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -8044,7 +8044,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protoc } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->index_name); this->__isset.index_name = true; } else { @@ -8063,16 +8063,16 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_by_name_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->index_name); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8080,16 +8080,16 @@ uint32_t ThriftHiveMetastore_get_index_by_name_args::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("index_name", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("index_name", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString((*(this->index_name))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8097,28 +8097,28 @@ uint32_t ThriftHiveMetastore_get_index_by_name_pargs::write(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_by_name_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -8126,7 +8126,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_result::read(apache::thrift::prot } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -8134,7 +8134,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_result::read(apache::thrift::prot } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8153,22 +8153,22 @@ uint32_t ThriftHiveMetastore_get_index_by_name_result::read(apache::thrift::prot return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_by_name_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_by_name_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + 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 += 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -8177,28 +8177,28 @@ uint32_t ThriftHiveMetastore_get_index_by_name_result::write(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -8206,7 +8206,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(apache::thrift::pro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -8214,7 +8214,7 @@ uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(apache::thrift::pro } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8233,28 +8233,28 @@ uint32_t ThriftHiveMetastore_get_index_by_name_presult::read(apache::thrift::pro return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_indexes_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -8262,7 +8262,7 @@ uint32_t ThriftHiveMetastore_get_indexes_args::read(apache::thrift::protocol::TP } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -8270,7 +8270,7 @@ uint32_t ThriftHiveMetastore_get_indexes_args::read(apache::thrift::protocol::TP } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_indexes); this->__isset.max_indexes = true; } else { @@ -8289,16 +8289,16 @@ uint32_t ThriftHiveMetastore_get_indexes_args::read(apache::thrift::protocol::TP return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_indexes_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8306,16 +8306,16 @@ uint32_t ThriftHiveMetastore_get_indexes_args::write(apache::thrift::protocol::T return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_indexes_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8323,32 +8323,32 @@ uint32_t ThriftHiveMetastore_get_indexes_pargs::write(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_indexes_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size287; - apache::thrift::protocol::TType _etype290; + ::apache::thrift::protocol::TType _etype290; iprot->readListBegin(_etype290, _size287); this->success.resize(_size287); uint32_t _i291; @@ -8364,7 +8364,7 @@ uint32_t ThriftHiveMetastore_get_indexes_result::read(apache::thrift::protocol:: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -8372,7 +8372,7 @@ uint32_t ThriftHiveMetastore_get_indexes_result::read(apache::thrift::protocol:: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8391,16 +8391,16 @@ uint32_t ThriftHiveMetastore_get_indexes_result::read(apache::thrift::protocol:: return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_indexes_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_indexes_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->success.size()); std::vector ::const_iterator _iter292; for (_iter292 = this->success.begin(); _iter292 != this->success.end(); ++_iter292) { @@ -8410,11 +8410,11 @@ uint32_t ThriftHiveMetastore_get_indexes_result::write(apache::thrift::protocol: } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o1) { - xfer += oprot->writeFieldBegin("o1", apache::thrift::protocol::T_STRUCT, 1); + 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 += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 2); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -8423,32 +8423,32 @@ uint32_t ThriftHiveMetastore_get_indexes_result::write(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_indexes_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_indexes_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size293; - apache::thrift::protocol::TType _etype296; + ::apache::thrift::protocol::TType _etype296; iprot->readListBegin(_etype296, _size293); (*(this->success)).resize(_size293); uint32_t _i297; @@ -8464,7 +8464,7 @@ uint32_t ThriftHiveMetastore_get_indexes_presult::read(apache::thrift::protocol: } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o1.read(iprot); this->__isset.o1 = true; } else { @@ -8472,7 +8472,7 @@ uint32_t ThriftHiveMetastore_get_indexes_presult::read(apache::thrift::protocol: } break; case 2: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8491,28 +8491,28 @@ uint32_t ThriftHiveMetastore_get_indexes_presult::read(apache::thrift::protocol: return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_names_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->db_name); this->__isset.db_name = true; } else { @@ -8520,7 +8520,7 @@ uint32_t ThriftHiveMetastore_get_index_names_args::read(apache::thrift::protocol } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tbl_name); this->__isset.tbl_name = true; } else { @@ -8528,7 +8528,7 @@ uint32_t ThriftHiveMetastore_get_index_names_args::read(apache::thrift::protocol } break; case 3: - if (ftype == apache::thrift::protocol::T_I16) { + if (ftype == ::apache::thrift::protocol::T_I16) { xfer += iprot->readI16(this->max_indexes); this->__isset.max_indexes = true; } else { @@ -8547,16 +8547,16 @@ uint32_t ThriftHiveMetastore_get_index_names_args::read(apache::thrift::protocol return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_names_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_args"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->tbl_name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16(this->max_indexes); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8564,16 +8564,16 @@ uint32_t ThriftHiveMetastore_get_index_names_args::write(apache::thrift::protoco return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_names_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_pargs"); - xfer += oprot->writeFieldBegin("db_name", apache::thrift::protocol::T_STRING, 1); + 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->writeFieldBegin("tbl_name", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString((*(this->tbl_name))); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("max_indexes", apache::thrift::protocol::T_I16, 3); + xfer += oprot->writeFieldBegin("max_indexes", ::apache::thrift::protocol::T_I16, 3); xfer += oprot->writeI16((*(this->max_indexes))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -8581,32 +8581,32 @@ uint32_t ThriftHiveMetastore_get_index_names_pargs::write(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_names_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size298; - apache::thrift::protocol::TType _etype301; + ::apache::thrift::protocol::TType _etype301; iprot->readListBegin(_etype301, _size298); this->success.resize(_size298); uint32_t _i302; @@ -8622,7 +8622,7 @@ uint32_t ThriftHiveMetastore_get_index_names_result::read(apache::thrift::protoc } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8641,16 +8641,16 @@ uint32_t ThriftHiveMetastore_get_index_names_result::read(apache::thrift::protoc return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHiveMetastore_get_index_names_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHiveMetastore_get_index_names_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter303; for (_iter303 = this->success.begin(); _iter303 != this->success.end(); ++_iter303) { @@ -8660,7 +8660,7 @@ uint32_t ThriftHiveMetastore_get_index_names_result::write(apache::thrift::proto } xfer += oprot->writeFieldEnd(); } else if (this->__isset.o2) { - xfer += oprot->writeFieldBegin("o2", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("o2", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->o2.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -8669,32 +8669,32 @@ uint32_t ThriftHiveMetastore_get_index_names_result::write(apache::thrift::proto return xfer; } -uint32_t ThriftHiveMetastore_get_index_names_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHiveMetastore_get_index_names_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size304; - apache::thrift::protocol::TType _etype307; + ::apache::thrift::protocol::TType _etype307; iprot->readListBegin(_etype307, _size304); (*(this->success)).resize(_size304); uint32_t _i308; @@ -8710,7 +8710,7 @@ uint32_t ThriftHiveMetastore_get_index_names_presult::read(apache::thrift::proto } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->o2.read(iprot); this->__isset.o2 = true; } else { @@ -8738,7 +8738,7 @@ void ThriftHiveMetastoreClient::create_database(const Database& database) void ThriftHiveMetastoreClient::send_create_database(const Database& database) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_database", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_database", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_create_database_pargs args; args.database = &database; @@ -8754,27 +8754,27 @@ void ThriftHiveMetastoreClient::recv_create_database() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("create_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_create_database_presult result; result.read(iprot_); @@ -8802,7 +8802,7 @@ void ThriftHiveMetastoreClient::get_database(Database& _return, const std::strin void ThriftHiveMetastoreClient::send_get_database(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_database", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_database", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_database_pargs args; args.name = &name; @@ -8818,27 +8818,27 @@ void ThriftHiveMetastoreClient::recv_get_database(Database& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_database_presult result; result.success = &_return; @@ -8856,7 +8856,7 @@ 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_database failed: unknown result"); } void ThriftHiveMetastoreClient::drop_database(const std::string& name, const bool deleteData) @@ -8868,7 +8868,7 @@ void ThriftHiveMetastoreClient::drop_database(const std::string& name, const boo void ThriftHiveMetastoreClient::send_drop_database(const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_database", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_database_pargs args; args.name = &name; @@ -8885,27 +8885,27 @@ void ThriftHiveMetastoreClient::recv_drop_database() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_database") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_drop_database_presult result; result.read(iprot_); @@ -8933,7 +8933,7 @@ void ThriftHiveMetastoreClient::get_databases(std::vector & _return void ThriftHiveMetastoreClient::send_get_databases(const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_databases_pargs args; args.pattern = &pattern; @@ -8949,27 +8949,27 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_databases") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_databases_presult result; result.success = &_return; @@ -8984,7 +8984,7 @@ void ThriftHiveMetastoreClient::recv_get_databases(std::vector & _r if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_databases failed: unknown result"); } void ThriftHiveMetastoreClient::get_all_databases(std::vector & _return) @@ -8996,7 +8996,7 @@ void ThriftHiveMetastoreClient::get_all_databases(std::vector & _re void ThriftHiveMetastoreClient::send_get_all_databases() { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_all_databases_pargs args; args.write(oprot_); @@ -9011,27 +9011,27 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_all_databases") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_all_databases_presult result; result.success = &_return; @@ -9046,7 +9046,7 @@ void ThriftHiveMetastoreClient::recv_get_all_databases(std::vector if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_databases failed: unknown result"); } void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) @@ -9058,7 +9058,7 @@ void ThriftHiveMetastoreClient::get_type(Type& _return, const std::string& name) void ThriftHiveMetastoreClient::send_get_type(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_type_pargs args; args.name = &name; @@ -9074,27 +9074,27 @@ void ThriftHiveMetastoreClient::recv_get_type(Type& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_type_presult result; result.success = &_return; @@ -9112,7 +9112,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type failed: unknown result"); } bool ThriftHiveMetastoreClient::create_type(const Type& type) @@ -9124,7 +9124,7 @@ bool ThriftHiveMetastoreClient::create_type(const Type& type) void ThriftHiveMetastoreClient::send_create_type(const Type& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_type", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_create_type_pargs args; args.type = &type; @@ -9140,27 +9140,27 @@ bool ThriftHiveMetastoreClient::recv_create_type() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("create_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; ThriftHiveMetastore_create_type_presult result; @@ -9181,7 +9181,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "create_type failed: unknown result"); } bool ThriftHiveMetastoreClient::drop_type(const std::string& type) @@ -9193,7 +9193,7 @@ bool ThriftHiveMetastoreClient::drop_type(const std::string& type) void ThriftHiveMetastoreClient::send_drop_type(const std::string& type) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_type", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_type_pargs args; args.type = &type; @@ -9209,27 +9209,27 @@ bool ThriftHiveMetastoreClient::recv_drop_type() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_type") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; ThriftHiveMetastore_drop_type_presult result; @@ -9247,7 +9247,7 @@ bool ThriftHiveMetastoreClient::recv_drop_type() if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_type failed: unknown result"); } void ThriftHiveMetastoreClient::get_type_all(std::map & _return, const std::string& name) @@ -9259,7 +9259,7 @@ void ThriftHiveMetastoreClient::get_type_all(std::map & _retu void ThriftHiveMetastoreClient::send_get_type_all(const std::string& name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_type_all", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_type_all_pargs args; args.name = &name; @@ -9275,27 +9275,27 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_type_all") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_type_all_presult result; result.success = &_return; @@ -9310,7 +9310,7 @@ void ThriftHiveMetastoreClient::recv_get_type_all(std::map & if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_type_all failed: unknown result"); } void ThriftHiveMetastoreClient::get_fields(std::vector & _return, const std::string& db_name, const std::string& table_name) @@ -9322,7 +9322,7 @@ void ThriftHiveMetastoreClient::get_fields(std::vector & _return, c void ThriftHiveMetastoreClient::send_get_fields(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_fields", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_fields_pargs args; args.db_name = &db_name; @@ -9339,27 +9339,27 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_fields") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_fields_presult result; result.success = &_return; @@ -9380,7 +9380,7 @@ void ThriftHiveMetastoreClient::recv_get_fields(std::vector & _retu 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_fields failed: unknown result"); } void ThriftHiveMetastoreClient::get_schema(std::vector & _return, const std::string& db_name, const std::string& table_name) @@ -9392,7 +9392,7 @@ void ThriftHiveMetastoreClient::get_schema(std::vector & _return, c void ThriftHiveMetastoreClient::send_get_schema(const std::string& db_name, const std::string& table_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_schema", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_schema_pargs args; args.db_name = &db_name; @@ -9409,27 +9409,27 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_schema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_schema_presult result; result.success = &_return; @@ -9450,7 +9450,7 @@ void ThriftHiveMetastoreClient::recv_get_schema(std::vector & _retu 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_schema failed: unknown result"); } void ThriftHiveMetastoreClient::create_table(const Table& tbl) @@ -9462,7 +9462,7 @@ void ThriftHiveMetastoreClient::create_table(const Table& tbl) void ThriftHiveMetastoreClient::send_create_table(const Table& tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("create_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("create_table", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_create_table_pargs args; args.tbl = &tbl; @@ -9478,27 +9478,27 @@ void ThriftHiveMetastoreClient::recv_create_table() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("create_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_create_table_presult result; result.read(iprot_); @@ -9529,7 +9529,7 @@ void ThriftHiveMetastoreClient::drop_table(const std::string& dbname, const std: void ThriftHiveMetastoreClient::send_drop_table(const std::string& dbname, const std::string& name, const bool deleteData) { int32_t cseqid = 0; - oprot_->writeMessageBegin("drop_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_table_pargs args; args.dbname = &dbname; @@ -9547,27 +9547,27 @@ void ThriftHiveMetastoreClient::recv_drop_table() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_drop_table_presult result; result.read(iprot_); @@ -9592,7 +9592,7 @@ void ThriftHiveMetastoreClient::get_tables(std::vector & _return, c void ThriftHiveMetastoreClient::send_get_tables(const std::string& db_name, const std::string& pattern) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_tables", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_tables_pargs args; args.db_name = &db_name; @@ -9609,27 +9609,27 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_tables") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_tables_presult result; result.success = &_return; @@ -9644,7 +9644,7 @@ void ThriftHiveMetastoreClient::recv_get_tables(std::vector & _retu if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_tables failed: unknown result"); } void ThriftHiveMetastoreClient::get_all_tables(std::vector & _return, const std::string& db_name) @@ -9656,7 +9656,7 @@ void ThriftHiveMetastoreClient::get_all_tables(std::vector & _retur void ThriftHiveMetastoreClient::send_get_all_tables(const std::string& db_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_all_tables_pargs args; args.db_name = &db_name; @@ -9672,27 +9672,27 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_all_tables") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_all_tables_presult result; result.success = &_return; @@ -9707,7 +9707,7 @@ void ThriftHiveMetastoreClient::recv_get_all_tables(std::vector & _ if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_all_tables failed: unknown result"); } void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbname, const std::string& tbl_name) @@ -9719,7 +9719,7 @@ void ThriftHiveMetastoreClient::get_table(Table& _return, const std::string& dbn void ThriftHiveMetastoreClient::send_get_table(const std::string& dbname, const std::string& tbl_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_table", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_table_pargs args; args.dbname = &dbname; @@ -9736,27 +9736,27 @@ void ThriftHiveMetastoreClient::recv_get_table(Table& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_table_presult result; result.success = &_return; @@ -9774,7 +9774,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_table failed: unknown result"); } void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) @@ -9786,7 +9786,7 @@ void ThriftHiveMetastoreClient::alter_table(const std::string& dbname, const std void ThriftHiveMetastoreClient::send_alter_table(const std::string& dbname, const std::string& tbl_name, const Table& new_tbl) { int32_t cseqid = 0; - oprot_->writeMessageBegin("alter_table", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_alter_table_pargs args; args.dbname = &dbname; @@ -9804,27 +9804,27 @@ void ThriftHiveMetastoreClient::recv_alter_table() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("alter_table") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_alter_table_presult result; result.read(iprot_); @@ -9849,7 +9849,7 @@ void ThriftHiveMetastoreClient::add_partition(Partition& _return, const Partitio void ThriftHiveMetastoreClient::send_add_partition(const Partition& new_part) { int32_t cseqid = 0; - oprot_->writeMessageBegin("add_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_add_partition_pargs args; args.new_part = &new_part; @@ -9865,27 +9865,27 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("add_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_add_partition_presult result; result.success = &_return; @@ -9906,7 +9906,7 @@ void ThriftHiveMetastoreClient::recv_add_partition(Partition& _return) 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, "add_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) @@ -9918,7 +9918,7 @@ void ThriftHiveMetastoreClient::append_partition(Partition& _return, const std:: 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("append_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_append_partition_pargs args; args.db_name = &db_name; @@ -9936,27 +9936,27 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("append_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_append_partition_presult result; result.success = &_return; @@ -9977,7 +9977,7 @@ void ThriftHiveMetastoreClient::recv_append_partition(Partition& _return) 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, "append_partition 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) @@ -9989,7 +9989,7 @@ void ThriftHiveMetastoreClient::append_partition_by_name(Partition& _return, con 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("append_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_append_partition_by_name_pargs args; args.db_name = &db_name; @@ -10007,27 +10007,27 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("append_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_append_partition_by_name_presult result; result.success = &_return; @@ -10048,7 +10048,7 @@ void ThriftHiveMetastoreClient::recv_append_partition_by_name(Partition& _return 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, "append_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) @@ -10060,7 +10060,7 @@ bool ThriftHiveMetastoreClient::drop_partition(const std::string& db_name, const 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("drop_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_partition_pargs args; args.db_name = &db_name; @@ -10079,27 +10079,27 @@ bool ThriftHiveMetastoreClient::recv_drop_partition() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; ThriftHiveMetastore_drop_partition_presult result; @@ -10117,7 +10117,7 @@ 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, "drop_partition 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) @@ -10129,7 +10129,7 @@ bool ThriftHiveMetastoreClient::drop_partition_by_name(const std::string& db_nam 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("drop_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_partition_by_name_pargs args; args.db_name = &db_name; @@ -10148,27 +10148,27 @@ bool ThriftHiveMetastoreClient::recv_drop_partition_by_name() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; ThriftHiveMetastore_drop_partition_by_name_presult result; @@ -10186,7 +10186,7 @@ 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, "drop_partition_by_name failed: unknown result"); } void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals) @@ -10198,7 +10198,7 @@ void ThriftHiveMetastoreClient::get_partition(Partition& _return, const std::str 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("get_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partition_pargs args; args.db_name = &db_name; @@ -10216,27 +10216,27 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partition_presult result; result.success = &_return; @@ -10254,7 +10254,7 @@ void ThriftHiveMetastoreClient::recv_get_partition(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition 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) @@ -10266,7 +10266,7 @@ void ThriftHiveMetastoreClient::get_partition_by_name(Partition& _return, const 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("get_partition_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partition_by_name_pargs args; args.db_name = &db_name; @@ -10284,27 +10284,27 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partition_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partition_by_name_presult result; result.success = &_return; @@ -10322,7 +10322,7 @@ void ThriftHiveMetastoreClient::recv_get_partition_by_name(Partition& _return) if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partition_by_name 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) @@ -10334,7 +10334,7 @@ void ThriftHiveMetastoreClient::get_partitions(std::vector & _return, 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("get_partitions", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partitions_pargs args; args.db_name = &db_name; @@ -10352,27 +10352,27 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partitions") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partitions_presult result; result.success = &_return; @@ -10390,7 +10390,7 @@ void ThriftHiveMetastoreClient::recv_get_partitions(std::vector & _re if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions failed: unknown result"); } void ThriftHiveMetastoreClient::get_partition_names(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const int16_t max_parts) @@ -10402,7 +10402,7 @@ void ThriftHiveMetastoreClient::get_partition_names(std::vector & _ 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_names", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partition_names_pargs args; args.db_name = &db_name; @@ -10420,27 +10420,27 @@ void ThriftHiveMetastoreClient::recv_get_partition_names(std::vectorreadMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partition_names") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partition_names_presult result; result.success = &_return; @@ -10455,7 +10455,7 @@ 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) @@ -10467,7 +10467,7 @@ void ThriftHiveMetastoreClient::get_partitions_ps(std::vector & _retu 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_partitions_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partitions_ps_pargs args; args.db_name = &db_name; @@ -10486,27 +10486,27 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partitions_ps") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partitions_ps_presult result; result.success = &_return; @@ -10521,7 +10521,7 @@ void ThriftHiveMetastoreClient::recv_get_partitions_ps(std::vector & if (result.__isset.o1) { throw result.o1; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_partitions_ps failed: unknown result"); } 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) @@ -10533,7 +10533,7 @@ void ThriftHiveMetastoreClient::get_partition_names_ps(std::vector void ThriftHiveMetastoreClient::send_get_partition_names_ps(const std::string& db_name, const std::string& tbl_name, const std::vector & part_vals, const int16_t max_parts) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partition_names_ps_pargs args; args.db_name = &db_name; @@ -10552,27 +10552,27 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vectorreadMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partition_names_ps") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partition_names_ps_presult result; result.success = &_return; @@ -10587,7 +10587,7 @@ void ThriftHiveMetastoreClient::recv_get_partition_names_ps(std::vector & _return, const std::string& db_name, const std::string& tbl_name, const std::string& filter, const int16_t max_parts) @@ -10599,7 +10599,7 @@ void ThriftHiveMetastoreClient::get_partitions_by_filter(std::vector 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_by_filter", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_partitions_by_filter_pargs args; args.db_name = &db_name; @@ -10618,27 +10618,27 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorreadMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_partitions_by_filter") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_partitions_by_filter_presult result; result.success = &_return; @@ -10656,7 +10656,7 @@ void ThriftHiveMetastoreClient::recv_get_partitions_by_filter(std::vectorwriteMessageBegin("alter_partition", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_alter_partition_pargs args; args.db_name = &db_name; @@ -10686,27 +10686,27 @@ void ThriftHiveMetastoreClient::recv_alter_partition() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("alter_partition") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_alter_partition_presult result; result.read(iprot_); @@ -10731,7 +10731,7 @@ void ThriftHiveMetastoreClient::get_config_value(std::string& _return, const std void ThriftHiveMetastoreClient::send_get_config_value(const std::string& name, const std::string& defaultValue) { int32_t cseqid = 0; - oprot_->writeMessageBegin("get_config_value", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_config_value_pargs args; args.name = &name; @@ -10748,27 +10748,27 @@ void ThriftHiveMetastoreClient::recv_get_config_value(std::string& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_config_value") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_config_value_presult result; result.success = &_return; @@ -10783,7 +10783,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_config_value failed: unknown result"); } void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector & _return, const std::string& part_name) @@ -10795,7 +10795,7 @@ void ThriftHiveMetastoreClient::partition_name_to_vals(std::vector void ThriftHiveMetastoreClient::send_partition_name_to_vals(const std::string& part_name) { int32_t cseqid = 0; - oprot_->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_partition_name_to_vals_pargs args; args.part_name = &part_name; @@ -10811,27 +10811,27 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vectorreadMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("partition_name_to_vals") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_partition_name_to_vals_presult result; result.success = &_return; @@ -10846,7 +10846,7 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_vals(std::vector & _return, const std::string& part_name) @@ -10858,7 +10858,7 @@ void ThriftHiveMetastoreClient::partition_name_to_spec(std::mapwriteMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_partition_name_to_spec_pargs args; args.part_name = &part_name; @@ -10874,27 +10874,27 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapreadMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("partition_name_to_spec") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_partition_name_to_spec_presult result; result.success = &_return; @@ -10909,7 +10909,7 @@ void ThriftHiveMetastoreClient::recv_partition_name_to_spec(std::mapwriteMessageBegin("add_index", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("add_index", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_add_index_pargs args; args.new_index = &new_index; @@ -10938,27 +10938,27 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("add_index") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_add_index_presult result; result.success = &_return; @@ -10979,7 +10979,7 @@ void ThriftHiveMetastoreClient::recv_add_index(Index& _return) if (result.__isset.o3) { throw result.o3; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "add_index failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "add_index 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) @@ -10991,7 +10991,7 @@ bool ThriftHiveMetastoreClient::drop_index_by_name(const std::string& db_name, c 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("drop_index_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_drop_index_by_name_pargs args; args.db_name = &db_name; @@ -11010,27 +11010,27 @@ bool ThriftHiveMetastoreClient::recv_drop_index_by_name() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("drop_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } bool _return; ThriftHiveMetastore_drop_index_by_name_presult result; @@ -11048,7 +11048,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "drop_index_by_name 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) @@ -11060,7 +11060,7 @@ void ThriftHiveMetastoreClient::get_index_by_name(Index& _return, const std::str 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("get_index_by_name", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_index_by_name_pargs args; args.db_name = &db_name; @@ -11078,27 +11078,27 @@ void ThriftHiveMetastoreClient::recv_get_index_by_name(Index& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_index_by_name") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_index_by_name_presult result; result.success = &_return; @@ -11116,7 +11116,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_by_name 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) @@ -11128,7 +11128,7 @@ void ThriftHiveMetastoreClient::get_indexes(std::vector & _return, const 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("get_indexes", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_indexes_pargs args; args.db_name = &db_name; @@ -11146,27 +11146,27 @@ void ThriftHiveMetastoreClient::recv_get_indexes(std::vector & _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_indexes") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_indexes_presult result; result.success = &_return; @@ -11184,7 +11184,7 @@ 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"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_indexes 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) @@ -11196,7 +11196,7 @@ void ThriftHiveMetastoreClient::get_index_names(std::vector & _retu 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("get_index_names", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHiveMetastore_get_index_names_pargs args; args.db_name = &db_name; @@ -11214,27 +11214,27 @@ void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("get_index_names") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHiveMetastore_get_index_names_presult result; result.success = &_return; @@ -11249,25 +11249,25 @@ void ThriftHiveMetastoreClient::recv_get_index_names(std::vector & if (result.__isset.o2) { throw result.o2; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get_index_names failed: unknown result"); } -bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { +bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) { - apache::thrift::protocol::TProtocol* iprot = piprot.get(); - apache::thrift::protocol::TProtocol* oprot = poprot.get(); + ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); + ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; int32_t seqid; iprot->readMessageBegin(fname, mtype, seqid); - if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { - iprot->skip(apache::thrift::protocol::T_STRUCT); + if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11278,8 +11278,8 @@ bool ThriftHiveMetastoreProcessor::process(boost::shared_ptr::iterator pfn; +bool ThriftHiveMetastoreProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { + std::map::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { return facebook::fb303::FacebookServiceProcessor::process_fn(iprot, oprot, fname, seqid); @@ -11288,7 +11288,7 @@ bool ThriftHiveMetastoreProcessor::process_fn(apache::thrift::protocol::TProtoco return true; } -void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_create_database_args args; args.read(iprot); @@ -11308,8 +11308,8 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11317,14 +11317,14 @@ void ThriftHiveMetastoreProcessor::process_create_database(int32_t seqid, apache return; } - oprot->writeMessageBegin("create_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_database", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_database_args args; args.read(iprot); @@ -11342,8 +11342,8 @@ void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::t result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11351,14 +11351,14 @@ void ThriftHiveMetastoreProcessor::process_get_database(int32_t seqid, apache::t return; } - oprot->writeMessageBegin("get_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_database", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_database_args args; args.read(iprot); @@ -11378,8 +11378,8 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache:: result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11387,14 +11387,14 @@ void ThriftHiveMetastoreProcessor::process_drop_database(int32_t seqid, apache:: return; } - oprot->writeMessageBegin("drop_database", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_database", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_databases_args args; args.read(iprot); @@ -11409,8 +11409,8 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache:: result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11418,14 +11418,14 @@ void ThriftHiveMetastoreProcessor::process_get_databases(int32_t seqid, apache:: return; } - oprot->writeMessageBegin("get_databases", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_databases", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_all_databases_args args; args.read(iprot); @@ -11440,8 +11440,8 @@ void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apac result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11449,14 +11449,14 @@ void ThriftHiveMetastoreProcessor::process_get_all_databases(int32_t seqid, apac return; } - oprot->writeMessageBegin("get_all_databases", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_all_databases", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_type_args args; args.read(iprot); @@ -11474,8 +11474,8 @@ void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrif result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11483,14 +11483,14 @@ void ThriftHiveMetastoreProcessor::process_get_type(int32_t seqid, apache::thrif return; } - oprot->writeMessageBegin("get_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_create_type_args args; args.read(iprot); @@ -11511,8 +11511,8 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, apache::th result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11520,14 +11520,14 @@ void ThriftHiveMetastoreProcessor::process_create_type(int32_t seqid, apache::th return; } - oprot->writeMessageBegin("create_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_type_args args; args.read(iprot); @@ -11545,8 +11545,8 @@ void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thri result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11554,14 +11554,14 @@ void ThriftHiveMetastoreProcessor::process_drop_type(int32_t seqid, apache::thri return; } - oprot->writeMessageBegin("drop_type", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_type", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_type_all_args args; args.read(iprot); @@ -11576,8 +11576,8 @@ void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, apache::t result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11585,14 +11585,14 @@ void ThriftHiveMetastoreProcessor::process_get_type_all(int32_t seqid, apache::t return; } - oprot->writeMessageBegin("get_type_all", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_type_all", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_fields_args args; args.read(iprot); @@ -11613,8 +11613,8 @@ void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, apache::thr result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11622,14 +11622,14 @@ void ThriftHiveMetastoreProcessor::process_get_fields(int32_t seqid, apache::thr return; } - oprot->writeMessageBegin("get_fields", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_fields", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_schema_args args; args.read(iprot); @@ -11650,8 +11650,8 @@ void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, apache::thr result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11659,14 +11659,14 @@ void ThriftHiveMetastoreProcessor::process_get_schema(int32_t seqid, apache::thr return; } - oprot->writeMessageBegin("get_schema", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_schema", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_create_table_args args; args.read(iprot); @@ -11689,8 +11689,8 @@ void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, apache::t result.o4 = o4; result.__isset.o4 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11698,14 +11698,14 @@ void ThriftHiveMetastoreProcessor::process_create_table(int32_t seqid, apache::t return; } - oprot->writeMessageBegin("create_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("create_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_table_args args; args.read(iprot); @@ -11722,8 +11722,8 @@ void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, apache::thr result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11731,14 +11731,14 @@ void ThriftHiveMetastoreProcessor::process_drop_table(int32_t seqid, apache::thr return; } - oprot->writeMessageBegin("drop_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_tables_args args; args.read(iprot); @@ -11753,8 +11753,8 @@ void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thr result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11762,14 +11762,14 @@ void ThriftHiveMetastoreProcessor::process_get_tables(int32_t seqid, apache::thr return; } - oprot->writeMessageBegin("get_tables", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_all_tables_args args; args.read(iprot); @@ -11784,8 +11784,8 @@ void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache: result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11793,14 +11793,14 @@ void ThriftHiveMetastoreProcessor::process_get_all_tables(int32_t seqid, apache: return; } - oprot->writeMessageBegin("get_all_tables", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_all_tables", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_table_args args; args.read(iprot); @@ -11818,8 +11818,8 @@ void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thri result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11827,14 +11827,14 @@ void ThriftHiveMetastoreProcessor::process_get_table(int32_t seqid, apache::thri return; } - oprot->writeMessageBegin("get_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_alter_table_args args; args.read(iprot); @@ -11851,8 +11851,8 @@ void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, apache::th result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11860,14 +11860,14 @@ void ThriftHiveMetastoreProcessor::process_alter_table(int32_t seqid, apache::th return; } - oprot->writeMessageBegin("alter_table", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_table", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_add_partition_args args; args.read(iprot); @@ -11888,8 +11888,8 @@ void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, apache:: result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11897,14 +11897,14 @@ void ThriftHiveMetastoreProcessor::process_add_partition(int32_t seqid, apache:: return; } - oprot->writeMessageBegin("add_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_append_partition_args args; args.read(iprot); @@ -11925,8 +11925,8 @@ void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apach result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11934,14 +11934,14 @@ void ThriftHiveMetastoreProcessor::process_append_partition(int32_t seqid, apach return; } - oprot->writeMessageBegin("append_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_append_partition_by_name_args args; args.read(iprot); @@ -11962,8 +11962,8 @@ void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqi result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -11971,14 +11971,14 @@ void ThriftHiveMetastoreProcessor::process_append_partition_by_name(int32_t seqi return; } - oprot->writeMessageBegin("append_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("append_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_partition_args args; args.read(iprot); @@ -11996,8 +11996,8 @@ void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache: result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12005,14 +12005,14 @@ void ThriftHiveMetastoreProcessor::process_drop_partition(int32_t seqid, apache: return; } - oprot->writeMessageBegin("drop_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_partition_by_name_args args; args.read(iprot); @@ -12030,8 +12030,8 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12039,14 +12039,14 @@ void ThriftHiveMetastoreProcessor::process_drop_partition_by_name(int32_t seqid, return; } - oprot->writeMessageBegin("drop_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partition_args args; args.read(iprot); @@ -12064,8 +12064,8 @@ void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, apache:: result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12073,14 +12073,14 @@ void ThriftHiveMetastoreProcessor::process_get_partition(int32_t seqid, apache:: return; } - oprot->writeMessageBegin("get_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partition_by_name_args args; args.read(iprot); @@ -12098,8 +12098,8 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12107,14 +12107,14 @@ void ThriftHiveMetastoreProcessor::process_get_partition_by_name(int32_t seqid, return; } - oprot->writeMessageBegin("get_partition_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partitions_args args; args.read(iprot); @@ -12132,8 +12132,8 @@ void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, apache: result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12141,14 +12141,14 @@ void ThriftHiveMetastoreProcessor::process_get_partitions(int32_t seqid, apache: return; } - oprot->writeMessageBegin("get_partitions", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partition_names_args args; args.read(iprot); @@ -12163,8 +12163,8 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ap result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12172,14 +12172,14 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names(int32_t seqid, ap return; } - oprot->writeMessageBegin("get_partition_names", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partitions_ps_args args; args.read(iprot); @@ -12194,8 +12194,8 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, apac result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12203,14 +12203,14 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_ps(int32_t seqid, apac return; } - oprot->writeMessageBegin("get_partitions_ps", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partition_names_ps_args args; args.read(iprot); @@ -12225,8 +12225,8 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12234,14 +12234,14 @@ void ThriftHiveMetastoreProcessor::process_get_partition_names_ps(int32_t seqid, return; } - oprot->writeMessageBegin("get_partition_names_ps", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partition_names_ps", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_partitions_by_filter_args args; args.read(iprot); @@ -12259,8 +12259,8 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqi result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12268,14 +12268,14 @@ void ThriftHiveMetastoreProcessor::process_get_partitions_by_filter(int32_t seqi return; } - oprot->writeMessageBegin("get_partitions_by_filter", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_partitions_by_filter", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_alter_partition_args args; args.read(iprot); @@ -12292,8 +12292,8 @@ void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, apache result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12301,14 +12301,14 @@ void ThriftHiveMetastoreProcessor::process_alter_partition(int32_t seqid, apache return; } - oprot->writeMessageBegin("alter_partition", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("alter_partition", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_config_value_args args; args.read(iprot); @@ -12323,8 +12323,8 @@ void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, apach result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12332,14 +12332,14 @@ void ThriftHiveMetastoreProcessor::process_get_config_value(int32_t seqid, apach return; } - oprot->writeMessageBegin("get_config_value", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_config_value", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_partition_name_to_vals_args args; args.read(iprot); @@ -12354,8 +12354,8 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12363,14 +12363,14 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_vals(int32_t seqid, return; } - oprot->writeMessageBegin("partition_name_to_vals", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_vals", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_partition_name_to_spec_args args; args.read(iprot); @@ -12385,8 +12385,8 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, result.o1 = o1; result.__isset.o1 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12394,14 +12394,14 @@ void ThriftHiveMetastoreProcessor::process_partition_name_to_spec(int32_t seqid, return; } - oprot->writeMessageBegin("partition_name_to_spec", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("partition_name_to_spec", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_add_index_args args; args.read(iprot); @@ -12422,8 +12422,8 @@ void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, apache::thri result.o3 = o3; result.__isset.o3 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12431,14 +12431,14 @@ void ThriftHiveMetastoreProcessor::process_add_index(int32_t seqid, apache::thri return; } - oprot->writeMessageBegin("add_index", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("add_index", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_drop_index_by_name_args args; args.read(iprot); @@ -12456,8 +12456,8 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, apa result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12465,14 +12465,14 @@ void ThriftHiveMetastoreProcessor::process_drop_index_by_name(int32_t seqid, apa return; } - oprot->writeMessageBegin("drop_index_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("drop_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_index_by_name_args args; args.read(iprot); @@ -12490,8 +12490,8 @@ void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, apac result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12499,14 +12499,14 @@ void ThriftHiveMetastoreProcessor::process_get_index_by_name(int32_t seqid, apac return; } - oprot->writeMessageBegin("get_index_by_name", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_by_name", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_indexes_args args; args.read(iprot); @@ -12524,8 +12524,8 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, apache::th result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12533,14 +12533,14 @@ void ThriftHiveMetastoreProcessor::process_get_indexes(int32_t seqid, apache::th return; } - oprot->writeMessageBegin("get_indexes", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_indexes", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHiveMetastore_get_index_names_args args; args.read(iprot); @@ -12555,8 +12555,8 @@ void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, apache result.o2 = o2; result.__isset.o2 = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -12564,7 +12564,7 @@ void ThriftHiveMetastoreProcessor::process_get_index_names(int32_t seqid, apache return; } - oprot->writeMessageBegin("get_index_names", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("get_index_names", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); diff --git metastore/src/gen-cpp/ThriftHiveMetastore.h metastore/src/gen-cpp/ThriftHiveMetastore.h index c67481e..b7c27ae 100644 --- metastore/src/gen-cpp/ThriftHiveMetastore.h +++ metastore/src/gen-cpp/ThriftHiveMetastore.h @@ -179,6 +179,11 @@ class ThriftHiveMetastoreNull : virtual public ThriftHiveMetastoreIf , virtual p } }; +typedef struct _ThriftHiveMetastore_create_database_args__isset { + _ThriftHiveMetastore_create_database_args__isset() : database(false) {} + bool database; +} _ThriftHiveMetastore_create_database_args__isset; + class ThriftHiveMetastore_create_database_args { public: @@ -189,10 +194,7 @@ class ThriftHiveMetastore_create_database_args { Database database; - struct __isset { - __isset() : database(false) {} - bool database; - } __isset; + _ThriftHiveMetastore_create_database_args__isset __isset; bool operator == (const ThriftHiveMetastore_create_database_args & rhs) const { @@ -206,11 +208,12 @@ class ThriftHiveMetastore_create_database_args { bool operator < (const ThriftHiveMetastore_create_database_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_create_database_pargs { public: @@ -219,10 +222,17 @@ class ThriftHiveMetastore_create_database_pargs { const Database* database; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_database_result__isset { + _ThriftHiveMetastore_create_database_result__isset() : o1(false), o2(false), o3(false) {} + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_create_database_result__isset; + class ThriftHiveMetastore_create_database_result { public: @@ -235,12 +245,7 @@ class ThriftHiveMetastore_create_database_result { InvalidObjectException o2; MetaException o3; - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_create_database_result__isset __isset; bool operator == (const ThriftHiveMetastore_create_database_result & rhs) const { @@ -258,11 +263,18 @@ class ThriftHiveMetastore_create_database_result { bool operator < (const ThriftHiveMetastore_create_database_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_database_presult__isset { + _ThriftHiveMetastore_create_database_presult__isset() : o1(false), o2(false), o3(false) {} + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_create_database_presult__isset; + class ThriftHiveMetastore_create_database_presult { public: @@ -273,17 +285,17 @@ class ThriftHiveMetastore_create_database_presult { InvalidObjectException o2; MetaException o3; - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_create_database_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_database_args__isset { + _ThriftHiveMetastore_get_database_args__isset() : name(false) {} + bool name; +} _ThriftHiveMetastore_get_database_args__isset; + class ThriftHiveMetastore_get_database_args { public: @@ -294,10 +306,7 @@ class ThriftHiveMetastore_get_database_args { std::string name; - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; + _ThriftHiveMetastore_get_database_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_database_args & rhs) const { @@ -311,11 +320,12 @@ class ThriftHiveMetastore_get_database_args { bool operator < (const ThriftHiveMetastore_get_database_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_database_pargs { public: @@ -324,10 +334,17 @@ class ThriftHiveMetastore_get_database_pargs { const std::string* name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_database_result__isset { + _ThriftHiveMetastore_get_database_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_database_result__isset; + class ThriftHiveMetastore_get_database_result { public: @@ -340,12 +357,7 @@ class ThriftHiveMetastore_get_database_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_database_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_database_result & rhs) const { @@ -363,11 +375,18 @@ class ThriftHiveMetastore_get_database_result { bool operator < (const ThriftHiveMetastore_get_database_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_database_presult__isset { + _ThriftHiveMetastore_get_database_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_database_presult__isset; + class ThriftHiveMetastore_get_database_presult { public: @@ -378,17 +397,18 @@ class ThriftHiveMetastore_get_database_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_database_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_database_args__isset { + _ThriftHiveMetastore_drop_database_args__isset() : name(false), deleteData(false) {} + bool name; + bool deleteData; +} _ThriftHiveMetastore_drop_database_args__isset; + class ThriftHiveMetastore_drop_database_args { public: @@ -400,11 +420,7 @@ class ThriftHiveMetastore_drop_database_args { std::string name; bool deleteData; - struct __isset { - __isset() : name(false), deleteData(false) {} - bool name; - bool deleteData; - } __isset; + _ThriftHiveMetastore_drop_database_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_database_args & rhs) const { @@ -420,11 +436,12 @@ class ThriftHiveMetastore_drop_database_args { bool operator < (const ThriftHiveMetastore_drop_database_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_database_pargs { public: @@ -434,10 +451,17 @@ class ThriftHiveMetastore_drop_database_pargs { const std::string* name; const bool* deleteData; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_database_result__isset { + _ThriftHiveMetastore_drop_database_result__isset() : o1(false), o2(false), o3(false) {} + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_drop_database_result__isset; + class ThriftHiveMetastore_drop_database_result { public: @@ -450,12 +474,7 @@ class ThriftHiveMetastore_drop_database_result { InvalidOperationException o2; MetaException o3; - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_drop_database_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_database_result & rhs) const { @@ -473,11 +492,18 @@ class ThriftHiveMetastore_drop_database_result { bool operator < (const ThriftHiveMetastore_drop_database_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_database_presult__isset { + _ThriftHiveMetastore_drop_database_presult__isset() : o1(false), o2(false), o3(false) {} + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_drop_database_presult__isset; + class ThriftHiveMetastore_drop_database_presult { public: @@ -488,17 +514,17 @@ class ThriftHiveMetastore_drop_database_presult { InvalidOperationException o2; MetaException o3; - struct __isset { - __isset() : o1(false), o2(false), o3(false) {} - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_drop_database_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_databases_args__isset { + _ThriftHiveMetastore_get_databases_args__isset() : pattern(false) {} + bool pattern; +} _ThriftHiveMetastore_get_databases_args__isset; + class ThriftHiveMetastore_get_databases_args { public: @@ -509,10 +535,7 @@ class ThriftHiveMetastore_get_databases_args { std::string pattern; - struct __isset { - __isset() : pattern(false) {} - bool pattern; - } __isset; + _ThriftHiveMetastore_get_databases_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_databases_args & rhs) const { @@ -526,11 +549,12 @@ class ThriftHiveMetastore_get_databases_args { bool operator < (const ThriftHiveMetastore_get_databases_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_databases_pargs { public: @@ -539,10 +563,16 @@ class ThriftHiveMetastore_get_databases_pargs { const std::string* pattern; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_databases_result__isset { + _ThriftHiveMetastore_get_databases_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_databases_result__isset; + class ThriftHiveMetastore_get_databases_result { public: @@ -554,11 +584,7 @@ class ThriftHiveMetastore_get_databases_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_databases_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_databases_result & rhs) const { @@ -574,11 +600,17 @@ class ThriftHiveMetastore_get_databases_result { bool operator < (const ThriftHiveMetastore_get_databases_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_databases_presult__isset { + _ThriftHiveMetastore_get_databases_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_databases_presult__isset; + class ThriftHiveMetastore_get_databases_presult { public: @@ -588,16 +620,13 @@ class ThriftHiveMetastore_get_databases_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_databases_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHiveMetastore_get_all_databases_args { public: @@ -617,11 +646,12 @@ class ThriftHiveMetastore_get_all_databases_args { bool operator < (const ThriftHiveMetastore_get_all_databases_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_all_databases_pargs { public: @@ -629,10 +659,16 @@ class ThriftHiveMetastore_get_all_databases_pargs { virtual ~ThriftHiveMetastore_get_all_databases_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_all_databases_result__isset { + _ThriftHiveMetastore_get_all_databases_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_databases_result__isset; + class ThriftHiveMetastore_get_all_databases_result { public: @@ -644,11 +680,7 @@ class ThriftHiveMetastore_get_all_databases_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_all_databases_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_all_databases_result & rhs) const { @@ -664,11 +696,17 @@ class ThriftHiveMetastore_get_all_databases_result { bool operator < (const ThriftHiveMetastore_get_all_databases_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_all_databases_presult__isset { + _ThriftHiveMetastore_get_all_databases_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_databases_presult__isset; + class ThriftHiveMetastore_get_all_databases_presult { public: @@ -678,16 +716,17 @@ class ThriftHiveMetastore_get_all_databases_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_all_databases_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_type_args__isset { + _ThriftHiveMetastore_get_type_args__isset() : name(false) {} + bool name; +} _ThriftHiveMetastore_get_type_args__isset; + class ThriftHiveMetastore_get_type_args { public: @@ -698,10 +737,7 @@ class ThriftHiveMetastore_get_type_args { std::string name; - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; + _ThriftHiveMetastore_get_type_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_type_args & rhs) const { @@ -715,11 +751,12 @@ class ThriftHiveMetastore_get_type_args { bool operator < (const ThriftHiveMetastore_get_type_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_type_pargs { public: @@ -728,10 +765,17 @@ class ThriftHiveMetastore_get_type_pargs { const std::string* name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_type_result__isset { + _ThriftHiveMetastore_get_type_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_type_result__isset; + class ThriftHiveMetastore_get_type_result { public: @@ -744,12 +788,7 @@ class ThriftHiveMetastore_get_type_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_type_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_type_result & rhs) const { @@ -767,11 +806,18 @@ class ThriftHiveMetastore_get_type_result { bool operator < (const ThriftHiveMetastore_get_type_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_type_presult__isset { + _ThriftHiveMetastore_get_type_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_type_presult__isset; + class ThriftHiveMetastore_get_type_presult { public: @@ -782,17 +828,17 @@ class ThriftHiveMetastore_get_type_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_type_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_create_type_args__isset { + _ThriftHiveMetastore_create_type_args__isset() : type(false) {} + bool type; +} _ThriftHiveMetastore_create_type_args__isset; + class ThriftHiveMetastore_create_type_args { public: @@ -803,10 +849,7 @@ class ThriftHiveMetastore_create_type_args { Type type; - struct __isset { - __isset() : type(false) {} - bool type; - } __isset; + _ThriftHiveMetastore_create_type_args__isset __isset; bool operator == (const ThriftHiveMetastore_create_type_args & rhs) const { @@ -820,11 +863,12 @@ class ThriftHiveMetastore_create_type_args { bool operator < (const ThriftHiveMetastore_create_type_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_create_type_pargs { public: @@ -833,10 +877,18 @@ class ThriftHiveMetastore_create_type_pargs { const Type* type; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_type_result__isset { + _ThriftHiveMetastore_create_type_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_create_type_result__isset; + class ThriftHiveMetastore_create_type_result { public: @@ -850,13 +902,7 @@ class ThriftHiveMetastore_create_type_result { InvalidObjectException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_create_type_result__isset __isset; bool operator == (const ThriftHiveMetastore_create_type_result & rhs) const { @@ -876,11 +922,19 @@ class ThriftHiveMetastore_create_type_result { bool operator < (const ThriftHiveMetastore_create_type_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_type_presult__isset { + _ThriftHiveMetastore_create_type_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_create_type_presult__isset; + class ThriftHiveMetastore_create_type_presult { public: @@ -892,18 +946,17 @@ class ThriftHiveMetastore_create_type_presult { InvalidObjectException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_create_type_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_type_args__isset { + _ThriftHiveMetastore_drop_type_args__isset() : type(false) {} + bool type; +} _ThriftHiveMetastore_drop_type_args__isset; + class ThriftHiveMetastore_drop_type_args { public: @@ -914,10 +967,7 @@ class ThriftHiveMetastore_drop_type_args { std::string type; - struct __isset { - __isset() : type(false) {} - bool type; - } __isset; + _ThriftHiveMetastore_drop_type_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_type_args & rhs) const { @@ -931,11 +981,12 @@ class ThriftHiveMetastore_drop_type_args { bool operator < (const ThriftHiveMetastore_drop_type_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_type_pargs { public: @@ -944,10 +995,17 @@ class ThriftHiveMetastore_drop_type_pargs { const std::string* type; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_type_result__isset { + _ThriftHiveMetastore_drop_type_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_type_result__isset; + class ThriftHiveMetastore_drop_type_result { public: @@ -960,12 +1018,7 @@ class ThriftHiveMetastore_drop_type_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_type_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_type_result & rhs) const { @@ -983,11 +1036,18 @@ class ThriftHiveMetastore_drop_type_result { bool operator < (const ThriftHiveMetastore_drop_type_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_type_presult__isset { + _ThriftHiveMetastore_drop_type_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_type_presult__isset; + class ThriftHiveMetastore_drop_type_presult { public: @@ -998,17 +1058,17 @@ class ThriftHiveMetastore_drop_type_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_type_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_type_all_args__isset { + _ThriftHiveMetastore_get_type_all_args__isset() : name(false) {} + bool name; +} _ThriftHiveMetastore_get_type_all_args__isset; + class ThriftHiveMetastore_get_type_all_args { public: @@ -1019,10 +1079,7 @@ class ThriftHiveMetastore_get_type_all_args { std::string name; - struct __isset { - __isset() : name(false) {} - bool name; - } __isset; + _ThriftHiveMetastore_get_type_all_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_type_all_args & rhs) const { @@ -1036,11 +1093,12 @@ class ThriftHiveMetastore_get_type_all_args { bool operator < (const ThriftHiveMetastore_get_type_all_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_type_all_pargs { public: @@ -1049,10 +1107,16 @@ class ThriftHiveMetastore_get_type_all_pargs { const std::string* name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_type_all_result__isset { + _ThriftHiveMetastore_get_type_all_result__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_type_all_result__isset; + class ThriftHiveMetastore_get_type_all_result { public: @@ -1064,11 +1128,7 @@ class ThriftHiveMetastore_get_type_all_result { std::map success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_type_all_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_type_all_result & rhs) const { @@ -1084,11 +1144,17 @@ class ThriftHiveMetastore_get_type_all_result { bool operator < (const ThriftHiveMetastore_get_type_all_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_type_all_presult__isset { + _ThriftHiveMetastore_get_type_all_presult__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_type_all_presult__isset; + class ThriftHiveMetastore_get_type_all_presult { public: @@ -1098,16 +1164,18 @@ class ThriftHiveMetastore_get_type_all_presult { std::map * success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_type_all_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_fields_args__isset { + _ThriftHiveMetastore_get_fields_args__isset() : db_name(false), table_name(false) {} + bool db_name; + bool table_name; +} _ThriftHiveMetastore_get_fields_args__isset; + class ThriftHiveMetastore_get_fields_args { public: @@ -1119,11 +1187,7 @@ class ThriftHiveMetastore_get_fields_args { std::string db_name; std::string table_name; - struct __isset { - __isset() : db_name(false), table_name(false) {} - bool db_name; - bool table_name; - } __isset; + _ThriftHiveMetastore_get_fields_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_fields_args & rhs) const { @@ -1139,11 +1203,12 @@ class ThriftHiveMetastore_get_fields_args { bool operator < (const ThriftHiveMetastore_get_fields_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_fields_pargs { public: @@ -1153,10 +1218,18 @@ class ThriftHiveMetastore_get_fields_pargs { const std::string* db_name; const std::string* table_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_fields_result__isset { + _ThriftHiveMetastore_get_fields_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_fields_result__isset; + class ThriftHiveMetastore_get_fields_result { public: @@ -1170,13 +1243,7 @@ class ThriftHiveMetastore_get_fields_result { UnknownTableException o2; UnknownDBException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_get_fields_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_fields_result & rhs) const { @@ -1196,11 +1263,19 @@ class ThriftHiveMetastore_get_fields_result { bool operator < (const ThriftHiveMetastore_get_fields_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_fields_presult__isset { + _ThriftHiveMetastore_get_fields_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_fields_presult__isset; + class ThriftHiveMetastore_get_fields_presult { public: @@ -1212,18 +1287,18 @@ class ThriftHiveMetastore_get_fields_presult { UnknownTableException o2; UnknownDBException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_get_fields_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_schema_args__isset { + _ThriftHiveMetastore_get_schema_args__isset() : db_name(false), table_name(false) {} + bool db_name; + bool table_name; +} _ThriftHiveMetastore_get_schema_args__isset; + class ThriftHiveMetastore_get_schema_args { public: @@ -1235,11 +1310,7 @@ class ThriftHiveMetastore_get_schema_args { std::string db_name; std::string table_name; - struct __isset { - __isset() : db_name(false), table_name(false) {} - bool db_name; - bool table_name; - } __isset; + _ThriftHiveMetastore_get_schema_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_schema_args & rhs) const { @@ -1255,11 +1326,12 @@ class ThriftHiveMetastore_get_schema_args { bool operator < (const ThriftHiveMetastore_get_schema_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_schema_pargs { public: @@ -1269,10 +1341,18 @@ class ThriftHiveMetastore_get_schema_pargs { const std::string* db_name; const std::string* table_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_schema_result__isset { + _ThriftHiveMetastore_get_schema_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_schema_result__isset; + class ThriftHiveMetastore_get_schema_result { public: @@ -1286,13 +1366,7 @@ class ThriftHiveMetastore_get_schema_result { UnknownTableException o2; UnknownDBException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_get_schema_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_schema_result & rhs) const { @@ -1312,11 +1386,19 @@ class ThriftHiveMetastore_get_schema_result { bool operator < (const ThriftHiveMetastore_get_schema_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_schema_presult__isset { + _ThriftHiveMetastore_get_schema_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_get_schema_presult__isset; + class ThriftHiveMetastore_get_schema_presult { public: @@ -1328,18 +1410,17 @@ class ThriftHiveMetastore_get_schema_presult { UnknownTableException o2; UnknownDBException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_get_schema_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_create_table_args__isset { + _ThriftHiveMetastore_create_table_args__isset() : tbl(false) {} + bool tbl; +} _ThriftHiveMetastore_create_table_args__isset; + class ThriftHiveMetastore_create_table_args { public: @@ -1350,10 +1431,7 @@ class ThriftHiveMetastore_create_table_args { Table tbl; - struct __isset { - __isset() : tbl(false) {} - bool tbl; - } __isset; + _ThriftHiveMetastore_create_table_args__isset __isset; bool operator == (const ThriftHiveMetastore_create_table_args & rhs) const { @@ -1367,11 +1445,12 @@ class ThriftHiveMetastore_create_table_args { bool operator < (const ThriftHiveMetastore_create_table_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_create_table_pargs { public: @@ -1380,10 +1459,18 @@ class ThriftHiveMetastore_create_table_pargs { const Table* tbl; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_table_result__isset { + _ThriftHiveMetastore_create_table_result__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_create_table_result__isset; + class ThriftHiveMetastore_create_table_result { public: @@ -1397,13 +1484,7 @@ class ThriftHiveMetastore_create_table_result { MetaException o3; NoSuchObjectException o4; - struct __isset { - __isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1; - bool o2; - bool o3; - bool o4; - } __isset; + _ThriftHiveMetastore_create_table_result__isset __isset; bool operator == (const ThriftHiveMetastore_create_table_result & rhs) const { @@ -1423,11 +1504,19 @@ class ThriftHiveMetastore_create_table_result { bool operator < (const ThriftHiveMetastore_create_table_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_create_table_presult__isset { + _ThriftHiveMetastore_create_table_presult__isset() : o1(false), o2(false), o3(false), o4(false) {} + bool o1; + bool o2; + bool o3; + bool o4; +} _ThriftHiveMetastore_create_table_presult__isset; + class ThriftHiveMetastore_create_table_presult { public: @@ -1439,18 +1528,19 @@ class ThriftHiveMetastore_create_table_presult { MetaException o3; NoSuchObjectException o4; - struct __isset { - __isset() : o1(false), o2(false), o3(false), o4(false) {} - bool o1; - bool o2; - bool o3; - bool o4; - } __isset; + _ThriftHiveMetastore_create_table_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_table_args__isset { + _ThriftHiveMetastore_drop_table_args__isset() : dbname(false), name(false), deleteData(false) {} + bool dbname; + bool name; + bool deleteData; +} _ThriftHiveMetastore_drop_table_args__isset; + class ThriftHiveMetastore_drop_table_args { public: @@ -1463,12 +1553,7 @@ class ThriftHiveMetastore_drop_table_args { std::string name; bool deleteData; - struct __isset { - __isset() : dbname(false), name(false), deleteData(false) {} - bool dbname; - bool name; - bool deleteData; - } __isset; + _ThriftHiveMetastore_drop_table_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_table_args & rhs) const { @@ -1486,11 +1571,12 @@ class ThriftHiveMetastore_drop_table_args { bool operator < (const ThriftHiveMetastore_drop_table_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_table_pargs { public: @@ -1501,10 +1587,16 @@ class ThriftHiveMetastore_drop_table_pargs { const std::string* name; const bool* deleteData; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_table_result__isset { + _ThriftHiveMetastore_drop_table_result__isset() : o1(false), o3(false) {} + bool o1; + bool o3; +} _ThriftHiveMetastore_drop_table_result__isset; + class ThriftHiveMetastore_drop_table_result { public: @@ -1516,11 +1608,7 @@ class ThriftHiveMetastore_drop_table_result { NoSuchObjectException o1; MetaException o3; - struct __isset { - __isset() : o1(false), o3(false) {} - bool o1; - bool o3; - } __isset; + _ThriftHiveMetastore_drop_table_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_table_result & rhs) const { @@ -1536,11 +1624,17 @@ class ThriftHiveMetastore_drop_table_result { bool operator < (const ThriftHiveMetastore_drop_table_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_table_presult__isset { + _ThriftHiveMetastore_drop_table_presult__isset() : o1(false), o3(false) {} + bool o1; + bool o3; +} _ThriftHiveMetastore_drop_table_presult__isset; + class ThriftHiveMetastore_drop_table_presult { public: @@ -1550,16 +1644,18 @@ class ThriftHiveMetastore_drop_table_presult { NoSuchObjectException o1; MetaException o3; - struct __isset { - __isset() : o1(false), o3(false) {} - bool o1; - bool o3; - } __isset; + _ThriftHiveMetastore_drop_table_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_tables_args__isset { + _ThriftHiveMetastore_get_tables_args__isset() : db_name(false), pattern(false) {} + bool db_name; + bool pattern; +} _ThriftHiveMetastore_get_tables_args__isset; + class ThriftHiveMetastore_get_tables_args { public: @@ -1571,11 +1667,7 @@ class ThriftHiveMetastore_get_tables_args { std::string db_name; std::string pattern; - struct __isset { - __isset() : db_name(false), pattern(false) {} - bool db_name; - bool pattern; - } __isset; + _ThriftHiveMetastore_get_tables_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_tables_args & rhs) const { @@ -1591,11 +1683,12 @@ class ThriftHiveMetastore_get_tables_args { bool operator < (const ThriftHiveMetastore_get_tables_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_tables_pargs { public: @@ -1605,10 +1698,16 @@ class ThriftHiveMetastore_get_tables_pargs { const std::string* db_name; const std::string* pattern; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_tables_result__isset { + _ThriftHiveMetastore_get_tables_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_result__isset; + class ThriftHiveMetastore_get_tables_result { public: @@ -1620,11 +1719,7 @@ class ThriftHiveMetastore_get_tables_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_tables_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_tables_result & rhs) const { @@ -1640,11 +1735,17 @@ class ThriftHiveMetastore_get_tables_result { bool operator < (const ThriftHiveMetastore_get_tables_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_tables_presult__isset { + _ThriftHiveMetastore_get_tables_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_tables_presult__isset; + class ThriftHiveMetastore_get_tables_presult { public: @@ -1654,16 +1755,17 @@ class ThriftHiveMetastore_get_tables_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_tables_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_all_tables_args__isset { + _ThriftHiveMetastore_get_all_tables_args__isset() : db_name(false) {} + bool db_name; +} _ThriftHiveMetastore_get_all_tables_args__isset; + class ThriftHiveMetastore_get_all_tables_args { public: @@ -1674,10 +1776,7 @@ class ThriftHiveMetastore_get_all_tables_args { std::string db_name; - struct __isset { - __isset() : db_name(false) {} - bool db_name; - } __isset; + _ThriftHiveMetastore_get_all_tables_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_all_tables_args & rhs) const { @@ -1691,11 +1790,12 @@ class ThriftHiveMetastore_get_all_tables_args { bool operator < (const ThriftHiveMetastore_get_all_tables_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_all_tables_pargs { public: @@ -1704,10 +1804,16 @@ class ThriftHiveMetastore_get_all_tables_pargs { const std::string* db_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_all_tables_result__isset { + _ThriftHiveMetastore_get_all_tables_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_tables_result__isset; + class ThriftHiveMetastore_get_all_tables_result { public: @@ -1719,11 +1825,7 @@ class ThriftHiveMetastore_get_all_tables_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_all_tables_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_all_tables_result & rhs) const { @@ -1739,11 +1841,17 @@ class ThriftHiveMetastore_get_all_tables_result { bool operator < (const ThriftHiveMetastore_get_all_tables_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_all_tables_presult__isset { + _ThriftHiveMetastore_get_all_tables_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_all_tables_presult__isset; + class ThriftHiveMetastore_get_all_tables_presult { public: @@ -1753,16 +1861,18 @@ class ThriftHiveMetastore_get_all_tables_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_all_tables_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_table_args__isset { + _ThriftHiveMetastore_get_table_args__isset() : dbname(false), tbl_name(false) {} + bool dbname; + bool tbl_name; +} _ThriftHiveMetastore_get_table_args__isset; + class ThriftHiveMetastore_get_table_args { public: @@ -1774,11 +1884,7 @@ class ThriftHiveMetastore_get_table_args { std::string dbname; std::string tbl_name; - struct __isset { - __isset() : dbname(false), tbl_name(false) {} - bool dbname; - bool tbl_name; - } __isset; + _ThriftHiveMetastore_get_table_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_table_args & rhs) const { @@ -1794,11 +1900,12 @@ class ThriftHiveMetastore_get_table_args { bool operator < (const ThriftHiveMetastore_get_table_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_table_pargs { public: @@ -1808,10 +1915,17 @@ class ThriftHiveMetastore_get_table_pargs { const std::string* dbname; const std::string* tbl_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_table_result__isset { + _ThriftHiveMetastore_get_table_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_table_result__isset; + class ThriftHiveMetastore_get_table_result { public: @@ -1824,12 +1938,7 @@ class ThriftHiveMetastore_get_table_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_table_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_table_result & rhs) const { @@ -1847,11 +1956,18 @@ class ThriftHiveMetastore_get_table_result { bool operator < (const ThriftHiveMetastore_get_table_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_table_presult__isset { + _ThriftHiveMetastore_get_table_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_table_presult__isset; + class ThriftHiveMetastore_get_table_presult { public: @@ -1862,17 +1978,19 @@ class ThriftHiveMetastore_get_table_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_table_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_alter_table_args__isset { + _ThriftHiveMetastore_alter_table_args__isset() : dbname(false), tbl_name(false), new_tbl(false) {} + bool dbname; + bool tbl_name; + bool new_tbl; +} _ThriftHiveMetastore_alter_table_args__isset; + class ThriftHiveMetastore_alter_table_args { public: @@ -1885,12 +2003,7 @@ class ThriftHiveMetastore_alter_table_args { std::string tbl_name; Table new_tbl; - struct __isset { - __isset() : dbname(false), tbl_name(false), new_tbl(false) {} - bool dbname; - bool tbl_name; - bool new_tbl; - } __isset; + _ThriftHiveMetastore_alter_table_args__isset __isset; bool operator == (const ThriftHiveMetastore_alter_table_args & rhs) const { @@ -1908,11 +2021,12 @@ class ThriftHiveMetastore_alter_table_args { bool operator < (const ThriftHiveMetastore_alter_table_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_alter_table_pargs { public: @@ -1923,10 +2037,16 @@ class ThriftHiveMetastore_alter_table_pargs { const std::string* tbl_name; const Table* new_tbl; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_alter_table_result__isset { + _ThriftHiveMetastore_alter_table_result__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_table_result__isset; + class ThriftHiveMetastore_alter_table_result { public: @@ -1938,11 +2058,7 @@ class ThriftHiveMetastore_alter_table_result { InvalidOperationException o1; MetaException o2; - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_alter_table_result__isset __isset; bool operator == (const ThriftHiveMetastore_alter_table_result & rhs) const { @@ -1958,11 +2074,17 @@ class ThriftHiveMetastore_alter_table_result { bool operator < (const ThriftHiveMetastore_alter_table_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_alter_table_presult__isset { + _ThriftHiveMetastore_alter_table_presult__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_table_presult__isset; + class ThriftHiveMetastore_alter_table_presult { public: @@ -1972,16 +2094,17 @@ class ThriftHiveMetastore_alter_table_presult { InvalidOperationException o1; MetaException o2; - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_alter_table_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_add_partition_args__isset { + _ThriftHiveMetastore_add_partition_args__isset() : new_part(false) {} + bool new_part; +} _ThriftHiveMetastore_add_partition_args__isset; + class ThriftHiveMetastore_add_partition_args { public: @@ -1992,10 +2115,7 @@ class ThriftHiveMetastore_add_partition_args { Partition new_part; - struct __isset { - __isset() : new_part(false) {} - bool new_part; - } __isset; + _ThriftHiveMetastore_add_partition_args__isset __isset; bool operator == (const ThriftHiveMetastore_add_partition_args & rhs) const { @@ -2009,11 +2129,12 @@ class ThriftHiveMetastore_add_partition_args { bool operator < (const ThriftHiveMetastore_add_partition_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_add_partition_pargs { public: @@ -2022,10 +2143,18 @@ class ThriftHiveMetastore_add_partition_pargs { const Partition* new_part; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_add_partition_result__isset { + _ThriftHiveMetastore_add_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_add_partition_result__isset; + class ThriftHiveMetastore_add_partition_result { public: @@ -2039,13 +2168,7 @@ class ThriftHiveMetastore_add_partition_result { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_add_partition_result__isset __isset; bool operator == (const ThriftHiveMetastore_add_partition_result & rhs) const { @@ -2065,11 +2188,19 @@ class ThriftHiveMetastore_add_partition_result { bool operator < (const ThriftHiveMetastore_add_partition_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_add_partition_presult__isset { + _ThriftHiveMetastore_add_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_add_partition_presult__isset; + class ThriftHiveMetastore_add_partition_presult { public: @@ -2081,18 +2212,19 @@ class ThriftHiveMetastore_add_partition_presult { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_add_partition_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_append_partition_args__isset { + _ThriftHiveMetastore_append_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} + bool db_name; + bool tbl_name; + bool part_vals; +} _ThriftHiveMetastore_append_partition_args__isset; + class ThriftHiveMetastore_append_partition_args { public: @@ -2105,12 +2237,7 @@ class ThriftHiveMetastore_append_partition_args { std::string tbl_name; std::vector part_vals; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false) {} - bool db_name; - bool tbl_name; - bool part_vals; - } __isset; + _ThriftHiveMetastore_append_partition_args__isset __isset; bool operator == (const ThriftHiveMetastore_append_partition_args & rhs) const { @@ -2128,11 +2255,12 @@ class ThriftHiveMetastore_append_partition_args { bool operator < (const ThriftHiveMetastore_append_partition_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_append_partition_pargs { public: @@ -2143,10 +2271,18 @@ class ThriftHiveMetastore_append_partition_pargs { const std::string* tbl_name; const std::vector * part_vals; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_append_partition_result__isset { + _ThriftHiveMetastore_append_partition_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_append_partition_result__isset; + class ThriftHiveMetastore_append_partition_result { public: @@ -2160,13 +2296,7 @@ class ThriftHiveMetastore_append_partition_result { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_append_partition_result__isset __isset; bool operator == (const ThriftHiveMetastore_append_partition_result & rhs) const { @@ -2186,11 +2316,19 @@ class ThriftHiveMetastore_append_partition_result { bool operator < (const ThriftHiveMetastore_append_partition_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_append_partition_presult__isset { + _ThriftHiveMetastore_append_partition_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_append_partition_presult__isset; + class ThriftHiveMetastore_append_partition_presult { public: @@ -2202,18 +2340,19 @@ class ThriftHiveMetastore_append_partition_presult { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_append_partition_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_append_partition_by_name_args__isset { + _ThriftHiveMetastore_append_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} + bool db_name; + bool tbl_name; + bool part_name; +} _ThriftHiveMetastore_append_partition_by_name_args__isset; + class ThriftHiveMetastore_append_partition_by_name_args { public: @@ -2226,12 +2365,7 @@ class ThriftHiveMetastore_append_partition_by_name_args { std::string tbl_name; std::string part_name; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_name(false) {} - bool db_name; - bool tbl_name; - bool part_name; - } __isset; + _ThriftHiveMetastore_append_partition_by_name_args__isset __isset; bool operator == (const ThriftHiveMetastore_append_partition_by_name_args & rhs) const { @@ -2249,11 +2383,12 @@ class ThriftHiveMetastore_append_partition_by_name_args { bool operator < (const ThriftHiveMetastore_append_partition_by_name_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_append_partition_by_name_pargs { public: @@ -2264,10 +2399,18 @@ class ThriftHiveMetastore_append_partition_by_name_pargs { const std::string* tbl_name; const std::string* part_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_append_partition_by_name_result__isset { + _ThriftHiveMetastore_append_partition_by_name_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_append_partition_by_name_result__isset; + class ThriftHiveMetastore_append_partition_by_name_result { public: @@ -2281,13 +2424,7 @@ class ThriftHiveMetastore_append_partition_by_name_result { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_append_partition_by_name_result__isset __isset; bool operator == (const ThriftHiveMetastore_append_partition_by_name_result & rhs) const { @@ -2307,11 +2444,19 @@ class ThriftHiveMetastore_append_partition_by_name_result { bool operator < (const ThriftHiveMetastore_append_partition_by_name_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_append_partition_by_name_presult__isset { + _ThriftHiveMetastore_append_partition_by_name_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_append_partition_by_name_presult__isset; + class ThriftHiveMetastore_append_partition_by_name_presult { public: @@ -2323,18 +2468,20 @@ class ThriftHiveMetastore_append_partition_by_name_presult { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_append_partition_by_name_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_partition_args__isset { + _ThriftHiveMetastore_drop_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false) {} + bool db_name; + bool tbl_name; + bool part_vals; + bool deleteData; +} _ThriftHiveMetastore_drop_partition_args__isset; + class ThriftHiveMetastore_drop_partition_args { public: @@ -2348,13 +2495,7 @@ class ThriftHiveMetastore_drop_partition_args { std::vector part_vals; bool deleteData; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false), deleteData(false) {} - bool db_name; - bool tbl_name; - bool part_vals; - bool deleteData; - } __isset; + _ThriftHiveMetastore_drop_partition_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_partition_args & rhs) const { @@ -2374,11 +2515,12 @@ class ThriftHiveMetastore_drop_partition_args { bool operator < (const ThriftHiveMetastore_drop_partition_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_partition_pargs { public: @@ -2390,10 +2532,17 @@ class ThriftHiveMetastore_drop_partition_pargs { const std::vector * part_vals; const bool* deleteData; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_partition_result__isset { + _ThriftHiveMetastore_drop_partition_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_partition_result__isset; + class ThriftHiveMetastore_drop_partition_result { public: @@ -2406,12 +2555,7 @@ class ThriftHiveMetastore_drop_partition_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_partition_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_partition_result & rhs) const { @@ -2429,11 +2573,18 @@ class ThriftHiveMetastore_drop_partition_result { bool operator < (const ThriftHiveMetastore_drop_partition_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_partition_presult__isset { + _ThriftHiveMetastore_drop_partition_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_partition_presult__isset; + class ThriftHiveMetastore_drop_partition_presult { public: @@ -2444,17 +2595,20 @@ class ThriftHiveMetastore_drop_partition_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_partition_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_partition_by_name_args__isset { + _ThriftHiveMetastore_drop_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false) {} + bool db_name; + bool tbl_name; + bool part_name; + bool deleteData; +} _ThriftHiveMetastore_drop_partition_by_name_args__isset; + class ThriftHiveMetastore_drop_partition_by_name_args { public: @@ -2468,13 +2622,7 @@ class ThriftHiveMetastore_drop_partition_by_name_args { std::string part_name; bool deleteData; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_name(false), deleteData(false) {} - bool db_name; - bool tbl_name; - bool part_name; - bool deleteData; - } __isset; + _ThriftHiveMetastore_drop_partition_by_name_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_partition_by_name_args & rhs) const { @@ -2494,11 +2642,12 @@ class ThriftHiveMetastore_drop_partition_by_name_args { bool operator < (const ThriftHiveMetastore_drop_partition_by_name_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_partition_by_name_pargs { public: @@ -2510,10 +2659,17 @@ class ThriftHiveMetastore_drop_partition_by_name_pargs { const std::string* part_name; const bool* deleteData; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_partition_by_name_result__isset { + _ThriftHiveMetastore_drop_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_partition_by_name_result__isset; + class ThriftHiveMetastore_drop_partition_by_name_result { public: @@ -2526,12 +2682,7 @@ class ThriftHiveMetastore_drop_partition_by_name_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_partition_by_name_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_partition_by_name_result & rhs) const { @@ -2549,11 +2700,18 @@ class ThriftHiveMetastore_drop_partition_by_name_result { bool operator < (const ThriftHiveMetastore_drop_partition_by_name_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_partition_by_name_presult__isset { + _ThriftHiveMetastore_drop_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_partition_by_name_presult__isset; + class ThriftHiveMetastore_drop_partition_by_name_presult { public: @@ -2564,17 +2722,19 @@ class ThriftHiveMetastore_drop_partition_by_name_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_partition_by_name_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partition_args__isset { + _ThriftHiveMetastore_get_partition_args__isset() : db_name(false), tbl_name(false), part_vals(false) {} + bool db_name; + bool tbl_name; + bool part_vals; +} _ThriftHiveMetastore_get_partition_args__isset; + class ThriftHiveMetastore_get_partition_args { public: @@ -2587,12 +2747,7 @@ class ThriftHiveMetastore_get_partition_args { std::string tbl_name; std::vector part_vals; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false) {} - bool db_name; - bool tbl_name; - bool part_vals; - } __isset; + _ThriftHiveMetastore_get_partition_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_args & rhs) const { @@ -2610,11 +2765,12 @@ class ThriftHiveMetastore_get_partition_args { bool operator < (const ThriftHiveMetastore_get_partition_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partition_pargs { public: @@ -2625,10 +2781,17 @@ class ThriftHiveMetastore_get_partition_pargs { const std::string* tbl_name; const std::vector * part_vals; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_result__isset { + _ThriftHiveMetastore_get_partition_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_result__isset; + class ThriftHiveMetastore_get_partition_result { public: @@ -2641,12 +2804,7 @@ class ThriftHiveMetastore_get_partition_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_result & rhs) const { @@ -2664,11 +2822,18 @@ class ThriftHiveMetastore_get_partition_result { bool operator < (const ThriftHiveMetastore_get_partition_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_presult__isset { + _ThriftHiveMetastore_get_partition_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_presult__isset; + class ThriftHiveMetastore_get_partition_presult { public: @@ -2679,17 +2844,19 @@ class ThriftHiveMetastore_get_partition_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partition_by_name_args__isset { + _ThriftHiveMetastore_get_partition_by_name_args__isset() : db_name(false), tbl_name(false), part_name(false) {} + bool db_name; + bool tbl_name; + bool part_name; +} _ThriftHiveMetastore_get_partition_by_name_args__isset; + class ThriftHiveMetastore_get_partition_by_name_args { public: @@ -2702,12 +2869,7 @@ class ThriftHiveMetastore_get_partition_by_name_args { std::string tbl_name; std::string part_name; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_name(false) {} - bool db_name; - bool tbl_name; - bool part_name; - } __isset; + _ThriftHiveMetastore_get_partition_by_name_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_by_name_args & rhs) const { @@ -2725,11 +2887,12 @@ class ThriftHiveMetastore_get_partition_by_name_args { bool operator < (const ThriftHiveMetastore_get_partition_by_name_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partition_by_name_pargs { public: @@ -2740,10 +2903,17 @@ class ThriftHiveMetastore_get_partition_by_name_pargs { const std::string* tbl_name; const std::string* part_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_by_name_result__isset { + _ThriftHiveMetastore_get_partition_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_by_name_result__isset; + class ThriftHiveMetastore_get_partition_by_name_result { public: @@ -2756,12 +2926,7 @@ class ThriftHiveMetastore_get_partition_by_name_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_by_name_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_by_name_result & rhs) const { @@ -2779,11 +2944,18 @@ class ThriftHiveMetastore_get_partition_by_name_result { bool operator < (const ThriftHiveMetastore_get_partition_by_name_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_by_name_presult__isset { + _ThriftHiveMetastore_get_partition_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partition_by_name_presult__isset; + class ThriftHiveMetastore_get_partition_by_name_presult { public: @@ -2794,17 +2966,19 @@ class ThriftHiveMetastore_get_partition_by_name_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_by_name_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partitions_args__isset { + _ThriftHiveMetastore_get_partitions_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool max_parts; +} _ThriftHiveMetastore_get_partitions_args__isset; + class ThriftHiveMetastore_get_partitions_args { public: @@ -2817,12 +2991,7 @@ class ThriftHiveMetastore_get_partitions_args { std::string tbl_name; int16_t max_parts; - struct __isset { - __isset() : db_name(false), tbl_name(false), max_parts(false) {} - bool db_name; - bool tbl_name; - bool max_parts; - } __isset; + _ThriftHiveMetastore_get_partitions_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_args & rhs) const { @@ -2840,11 +3009,12 @@ class ThriftHiveMetastore_get_partitions_args { bool operator < (const ThriftHiveMetastore_get_partitions_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partitions_pargs { public: @@ -2855,10 +3025,17 @@ class ThriftHiveMetastore_get_partitions_pargs { const std::string* tbl_name; const int16_t* max_parts; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_result__isset { + _ThriftHiveMetastore_get_partitions_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_result__isset; + class ThriftHiveMetastore_get_partitions_result { public: @@ -2871,12 +3048,7 @@ class ThriftHiveMetastore_get_partitions_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partitions_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_result & rhs) const { @@ -2894,11 +3066,18 @@ class ThriftHiveMetastore_get_partitions_result { bool operator < (const ThriftHiveMetastore_get_partitions_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_presult__isset { + _ThriftHiveMetastore_get_partitions_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_presult__isset; + class ThriftHiveMetastore_get_partitions_presult { public: @@ -2909,17 +3088,19 @@ class ThriftHiveMetastore_get_partitions_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partitions_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partition_names_args__isset { + _ThriftHiveMetastore_get_partition_names_args__isset() : db_name(false), tbl_name(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool max_parts; +} _ThriftHiveMetastore_get_partition_names_args__isset; + class ThriftHiveMetastore_get_partition_names_args { public: @@ -2932,12 +3113,7 @@ class ThriftHiveMetastore_get_partition_names_args { std::string tbl_name; int16_t max_parts; - struct __isset { - __isset() : db_name(false), tbl_name(false), max_parts(false) {} - bool db_name; - bool tbl_name; - bool max_parts; - } __isset; + _ThriftHiveMetastore_get_partition_names_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_names_args & rhs) const { @@ -2955,11 +3131,12 @@ class ThriftHiveMetastore_get_partition_names_args { bool operator < (const ThriftHiveMetastore_get_partition_names_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partition_names_pargs { public: @@ -2970,10 +3147,16 @@ class ThriftHiveMetastore_get_partition_names_pargs { const std::string* tbl_name; const int16_t* max_parts; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_names_result__isset { + _ThriftHiveMetastore_get_partition_names_result__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_partition_names_result__isset; + class ThriftHiveMetastore_get_partition_names_result { public: @@ -2985,11 +3168,7 @@ class ThriftHiveMetastore_get_partition_names_result { std::vector success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_names_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_names_result & rhs) const { @@ -3005,11 +3184,17 @@ class ThriftHiveMetastore_get_partition_names_result { bool operator < (const ThriftHiveMetastore_get_partition_names_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_names_presult__isset { + _ThriftHiveMetastore_get_partition_names_presult__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_partition_names_presult__isset; + class ThriftHiveMetastore_get_partition_names_presult { public: @@ -3019,16 +3204,20 @@ class ThriftHiveMetastore_get_partition_names_presult { std::vector * success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partition_names_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partitions_ps_args__isset { + _ThriftHiveMetastore_get_partitions_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool part_vals; + bool max_parts; +} _ThriftHiveMetastore_get_partitions_ps_args__isset; + class ThriftHiveMetastore_get_partitions_ps_args { public: @@ -3042,13 +3231,7 @@ class ThriftHiveMetastore_get_partitions_ps_args { std::vector part_vals; int16_t max_parts; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} - bool db_name; - bool tbl_name; - bool part_vals; - bool max_parts; - } __isset; + _ThriftHiveMetastore_get_partitions_ps_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_ps_args & rhs) const { @@ -3068,11 +3251,12 @@ class ThriftHiveMetastore_get_partitions_ps_args { bool operator < (const ThriftHiveMetastore_get_partitions_ps_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partitions_ps_pargs { public: @@ -3084,10 +3268,16 @@ class ThriftHiveMetastore_get_partitions_ps_pargs { const std::vector * part_vals; const int16_t* max_parts; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_ps_result__isset { + _ThriftHiveMetastore_get_partitions_ps_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partitions_ps_result__isset; + class ThriftHiveMetastore_get_partitions_ps_result { public: @@ -3099,11 +3289,7 @@ class ThriftHiveMetastore_get_partitions_ps_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_partitions_ps_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_ps_result & rhs) const { @@ -3119,11 +3305,17 @@ class ThriftHiveMetastore_get_partitions_ps_result { bool operator < (const ThriftHiveMetastore_get_partitions_ps_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_ps_presult__isset { + _ThriftHiveMetastore_get_partitions_ps_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partitions_ps_presult__isset; + class ThriftHiveMetastore_get_partitions_ps_presult { public: @@ -3133,16 +3325,20 @@ class ThriftHiveMetastore_get_partitions_ps_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_partitions_ps_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partition_names_ps_args__isset { + _ThriftHiveMetastore_get_partition_names_ps_args__isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool part_vals; + bool max_parts; +} _ThriftHiveMetastore_get_partition_names_ps_args__isset; + class ThriftHiveMetastore_get_partition_names_ps_args { public: @@ -3156,13 +3352,7 @@ class ThriftHiveMetastore_get_partition_names_ps_args { std::vector part_vals; int16_t max_parts; - struct __isset { - __isset() : db_name(false), tbl_name(false), part_vals(false), max_parts(false) {} - bool db_name; - bool tbl_name; - bool part_vals; - bool max_parts; - } __isset; + _ThriftHiveMetastore_get_partition_names_ps_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_names_ps_args & rhs) const { @@ -3182,11 +3372,12 @@ class ThriftHiveMetastore_get_partition_names_ps_args { bool operator < (const ThriftHiveMetastore_get_partition_names_ps_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partition_names_ps_pargs { public: @@ -3198,10 +3389,16 @@ class ThriftHiveMetastore_get_partition_names_ps_pargs { const std::vector * part_vals; const int16_t* max_parts; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_names_ps_result__isset { + _ThriftHiveMetastore_get_partition_names_ps_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partition_names_ps_result__isset; + class ThriftHiveMetastore_get_partition_names_ps_result { public: @@ -3213,11 +3410,7 @@ class ThriftHiveMetastore_get_partition_names_ps_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_partition_names_ps_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partition_names_ps_result & rhs) const { @@ -3233,11 +3426,17 @@ class ThriftHiveMetastore_get_partition_names_ps_result { bool operator < (const ThriftHiveMetastore_get_partition_names_ps_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partition_names_ps_presult__isset { + _ThriftHiveMetastore_get_partition_names_ps_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_partition_names_ps_presult__isset; + class ThriftHiveMetastore_get_partition_names_ps_presult { public: @@ -3247,16 +3446,20 @@ class ThriftHiveMetastore_get_partition_names_ps_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_partition_names_ps_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_partitions_by_filter_args__isset { + _ThriftHiveMetastore_get_partitions_by_filter_args__isset() : db_name(false), tbl_name(false), filter(false), max_parts(false) {} + bool db_name; + bool tbl_name; + bool filter; + bool max_parts; +} _ThriftHiveMetastore_get_partitions_by_filter_args__isset; + class ThriftHiveMetastore_get_partitions_by_filter_args { public: @@ -3270,13 +3473,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { std::string filter; int16_t max_parts; - struct __isset { - __isset() : db_name(false), tbl_name(false), filter(false), max_parts(false) {} - bool db_name; - bool tbl_name; - bool filter; - bool max_parts; - } __isset; + _ThriftHiveMetastore_get_partitions_by_filter_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_args & rhs) const { @@ -3296,11 +3493,12 @@ class ThriftHiveMetastore_get_partitions_by_filter_args { bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_partitions_by_filter_pargs { public: @@ -3312,10 +3510,17 @@ class ThriftHiveMetastore_get_partitions_by_filter_pargs { const std::string* filter; const int16_t* max_parts; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_by_filter_result__isset { + _ThriftHiveMetastore_get_partitions_by_filter_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_by_filter_result__isset; + class ThriftHiveMetastore_get_partitions_by_filter_result { public: @@ -3328,12 +3533,7 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partitions_by_filter_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_partitions_by_filter_result & rhs) const { @@ -3351,11 +3551,18 @@ class ThriftHiveMetastore_get_partitions_by_filter_result { bool operator < (const ThriftHiveMetastore_get_partitions_by_filter_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_partitions_by_filter_presult__isset { + _ThriftHiveMetastore_get_partitions_by_filter_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_partitions_by_filter_presult__isset; + class ThriftHiveMetastore_get_partitions_by_filter_presult { public: @@ -3366,17 +3573,19 @@ class ThriftHiveMetastore_get_partitions_by_filter_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_partitions_by_filter_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_alter_partition_args__isset { + _ThriftHiveMetastore_alter_partition_args__isset() : db_name(false), tbl_name(false), new_part(false) {} + bool db_name; + bool tbl_name; + bool new_part; +} _ThriftHiveMetastore_alter_partition_args__isset; + class ThriftHiveMetastore_alter_partition_args { public: @@ -3389,12 +3598,7 @@ class ThriftHiveMetastore_alter_partition_args { std::string tbl_name; Partition new_part; - struct __isset { - __isset() : db_name(false), tbl_name(false), new_part(false) {} - bool db_name; - bool tbl_name; - bool new_part; - } __isset; + _ThriftHiveMetastore_alter_partition_args__isset __isset; bool operator == (const ThriftHiveMetastore_alter_partition_args & rhs) const { @@ -3412,11 +3616,12 @@ class ThriftHiveMetastore_alter_partition_args { bool operator < (const ThriftHiveMetastore_alter_partition_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_alter_partition_pargs { public: @@ -3427,10 +3632,16 @@ class ThriftHiveMetastore_alter_partition_pargs { const std::string* tbl_name; const Partition* new_part; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_alter_partition_result__isset { + _ThriftHiveMetastore_alter_partition_result__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_partition_result__isset; + class ThriftHiveMetastore_alter_partition_result { public: @@ -3442,11 +3653,7 @@ class ThriftHiveMetastore_alter_partition_result { InvalidOperationException o1; MetaException o2; - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_alter_partition_result__isset __isset; bool operator == (const ThriftHiveMetastore_alter_partition_result & rhs) const { @@ -3462,11 +3669,17 @@ class ThriftHiveMetastore_alter_partition_result { bool operator < (const ThriftHiveMetastore_alter_partition_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_alter_partition_presult__isset { + _ThriftHiveMetastore_alter_partition_presult__isset() : o1(false), o2(false) {} + bool o1; + bool o2; +} _ThriftHiveMetastore_alter_partition_presult__isset; + class ThriftHiveMetastore_alter_partition_presult { public: @@ -3476,16 +3689,18 @@ class ThriftHiveMetastore_alter_partition_presult { InvalidOperationException o1; MetaException o2; - struct __isset { - __isset() : o1(false), o2(false) {} - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_alter_partition_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_config_value_args__isset { + _ThriftHiveMetastore_get_config_value_args__isset() : name(false), defaultValue(false) {} + bool name; + bool defaultValue; +} _ThriftHiveMetastore_get_config_value_args__isset; + class ThriftHiveMetastore_get_config_value_args { public: @@ -3497,11 +3712,7 @@ class ThriftHiveMetastore_get_config_value_args { std::string name; std::string defaultValue; - struct __isset { - __isset() : name(false), defaultValue(false) {} - bool name; - bool defaultValue; - } __isset; + _ThriftHiveMetastore_get_config_value_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_config_value_args & rhs) const { @@ -3517,11 +3728,12 @@ class ThriftHiveMetastore_get_config_value_args { bool operator < (const ThriftHiveMetastore_get_config_value_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_config_value_pargs { public: @@ -3531,10 +3743,16 @@ class ThriftHiveMetastore_get_config_value_pargs { const std::string* name; const std::string* defaultValue; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_config_value_result__isset { + _ThriftHiveMetastore_get_config_value_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_config_value_result__isset; + class ThriftHiveMetastore_get_config_value_result { public: @@ -3546,11 +3764,7 @@ class ThriftHiveMetastore_get_config_value_result { std::string success; ConfigValSecurityException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_config_value_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_config_value_result & rhs) const { @@ -3566,11 +3780,17 @@ class ThriftHiveMetastore_get_config_value_result { bool operator < (const ThriftHiveMetastore_get_config_value_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_config_value_presult__isset { + _ThriftHiveMetastore_get_config_value_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_get_config_value_presult__isset; + class ThriftHiveMetastore_get_config_value_presult { public: @@ -3580,16 +3800,17 @@ class ThriftHiveMetastore_get_config_value_presult { std::string* success; ConfigValSecurityException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_get_config_value_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_partition_name_to_vals_args__isset { + _ThriftHiveMetastore_partition_name_to_vals_args__isset() : part_name(false) {} + bool part_name; +} _ThriftHiveMetastore_partition_name_to_vals_args__isset; + class ThriftHiveMetastore_partition_name_to_vals_args { public: @@ -3600,10 +3821,7 @@ class ThriftHiveMetastore_partition_name_to_vals_args { std::string part_name; - struct __isset { - __isset() : part_name(false) {} - bool part_name; - } __isset; + _ThriftHiveMetastore_partition_name_to_vals_args__isset __isset; bool operator == (const ThriftHiveMetastore_partition_name_to_vals_args & rhs) const { @@ -3617,11 +3835,12 @@ class ThriftHiveMetastore_partition_name_to_vals_args { bool operator < (const ThriftHiveMetastore_partition_name_to_vals_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_partition_name_to_vals_pargs { public: @@ -3630,10 +3849,16 @@ class ThriftHiveMetastore_partition_name_to_vals_pargs { const std::string* part_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_partition_name_to_vals_result__isset { + _ThriftHiveMetastore_partition_name_to_vals_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_partition_name_to_vals_result__isset; + class ThriftHiveMetastore_partition_name_to_vals_result { public: @@ -3645,11 +3870,7 @@ class ThriftHiveMetastore_partition_name_to_vals_result { std::vector success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_partition_name_to_vals_result__isset __isset; bool operator == (const ThriftHiveMetastore_partition_name_to_vals_result & rhs) const { @@ -3665,11 +3886,17 @@ class ThriftHiveMetastore_partition_name_to_vals_result { bool operator < (const ThriftHiveMetastore_partition_name_to_vals_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_partition_name_to_vals_presult__isset { + _ThriftHiveMetastore_partition_name_to_vals_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_partition_name_to_vals_presult__isset; + class ThriftHiveMetastore_partition_name_to_vals_presult { public: @@ -3679,16 +3906,17 @@ class ThriftHiveMetastore_partition_name_to_vals_presult { std::vector * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_partition_name_to_vals_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_partition_name_to_spec_args__isset { + _ThriftHiveMetastore_partition_name_to_spec_args__isset() : part_name(false) {} + bool part_name; +} _ThriftHiveMetastore_partition_name_to_spec_args__isset; + class ThriftHiveMetastore_partition_name_to_spec_args { public: @@ -3699,10 +3927,7 @@ class ThriftHiveMetastore_partition_name_to_spec_args { std::string part_name; - struct __isset { - __isset() : part_name(false) {} - bool part_name; - } __isset; + _ThriftHiveMetastore_partition_name_to_spec_args__isset __isset; bool operator == (const ThriftHiveMetastore_partition_name_to_spec_args & rhs) const { @@ -3716,11 +3941,12 @@ class ThriftHiveMetastore_partition_name_to_spec_args { bool operator < (const ThriftHiveMetastore_partition_name_to_spec_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_partition_name_to_spec_pargs { public: @@ -3729,10 +3955,16 @@ class ThriftHiveMetastore_partition_name_to_spec_pargs { const std::string* part_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_partition_name_to_spec_result__isset { + _ThriftHiveMetastore_partition_name_to_spec_result__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_partition_name_to_spec_result__isset; + class ThriftHiveMetastore_partition_name_to_spec_result { public: @@ -3744,11 +3976,7 @@ class ThriftHiveMetastore_partition_name_to_spec_result { std::map success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_partition_name_to_spec_result__isset __isset; bool operator == (const ThriftHiveMetastore_partition_name_to_spec_result & rhs) const { @@ -3764,11 +3992,17 @@ class ThriftHiveMetastore_partition_name_to_spec_result { bool operator < (const ThriftHiveMetastore_partition_name_to_spec_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_partition_name_to_spec_presult__isset { + _ThriftHiveMetastore_partition_name_to_spec_presult__isset() : success(false), o1(false) {} + bool success; + bool o1; +} _ThriftHiveMetastore_partition_name_to_spec_presult__isset; + class ThriftHiveMetastore_partition_name_to_spec_presult { public: @@ -3778,16 +4012,18 @@ class ThriftHiveMetastore_partition_name_to_spec_presult { std::map * success; MetaException o1; - struct __isset { - __isset() : success(false), o1(false) {} - bool success; - bool o1; - } __isset; + _ThriftHiveMetastore_partition_name_to_spec_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_add_index_args__isset { + _ThriftHiveMetastore_add_index_args__isset() : new_index(false), index_table(false) {} + bool new_index; + bool index_table; +} _ThriftHiveMetastore_add_index_args__isset; + class ThriftHiveMetastore_add_index_args { public: @@ -3799,11 +4035,7 @@ class ThriftHiveMetastore_add_index_args { Index new_index; Table index_table; - struct __isset { - __isset() : new_index(false), index_table(false) {} - bool new_index; - bool index_table; - } __isset; + _ThriftHiveMetastore_add_index_args__isset __isset; bool operator == (const ThriftHiveMetastore_add_index_args & rhs) const { @@ -3819,11 +4051,12 @@ class ThriftHiveMetastore_add_index_args { bool operator < (const ThriftHiveMetastore_add_index_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_add_index_pargs { public: @@ -3833,10 +4066,18 @@ class ThriftHiveMetastore_add_index_pargs { const Index* new_index; const Table* index_table; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_add_index_result__isset { + _ThriftHiveMetastore_add_index_result__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_add_index_result__isset; + class ThriftHiveMetastore_add_index_result { public: @@ -3850,13 +4091,7 @@ class ThriftHiveMetastore_add_index_result { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_add_index_result__isset __isset; bool operator == (const ThriftHiveMetastore_add_index_result & rhs) const { @@ -3876,11 +4111,19 @@ class ThriftHiveMetastore_add_index_result { bool operator < (const ThriftHiveMetastore_add_index_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_add_index_presult__isset { + _ThriftHiveMetastore_add_index_presult__isset() : success(false), o1(false), o2(false), o3(false) {} + bool success; + bool o1; + bool o2; + bool o3; +} _ThriftHiveMetastore_add_index_presult__isset; + class ThriftHiveMetastore_add_index_presult { public: @@ -3892,18 +4135,20 @@ class ThriftHiveMetastore_add_index_presult { AlreadyExistsException o2; MetaException o3; - struct __isset { - __isset() : success(false), o1(false), o2(false), o3(false) {} - bool success; - bool o1; - bool o2; - bool o3; - } __isset; + _ThriftHiveMetastore_add_index_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_drop_index_by_name_args__isset { + _ThriftHiveMetastore_drop_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false), deleteData(false) {} + bool db_name; + bool tbl_name; + bool index_name; + bool deleteData; +} _ThriftHiveMetastore_drop_index_by_name_args__isset; + class ThriftHiveMetastore_drop_index_by_name_args { public: @@ -3917,13 +4162,7 @@ class ThriftHiveMetastore_drop_index_by_name_args { std::string index_name; bool deleteData; - struct __isset { - __isset() : db_name(false), tbl_name(false), index_name(false), deleteData(false) {} - bool db_name; - bool tbl_name; - bool index_name; - bool deleteData; - } __isset; + _ThriftHiveMetastore_drop_index_by_name_args__isset __isset; bool operator == (const ThriftHiveMetastore_drop_index_by_name_args & rhs) const { @@ -3943,11 +4182,12 @@ class ThriftHiveMetastore_drop_index_by_name_args { bool operator < (const ThriftHiveMetastore_drop_index_by_name_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_drop_index_by_name_pargs { public: @@ -3959,10 +4199,17 @@ class ThriftHiveMetastore_drop_index_by_name_pargs { const std::string* index_name; const bool* deleteData; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_index_by_name_result__isset { + _ThriftHiveMetastore_drop_index_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_index_by_name_result__isset; + class ThriftHiveMetastore_drop_index_by_name_result { public: @@ -3975,12 +4222,7 @@ class ThriftHiveMetastore_drop_index_by_name_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_index_by_name_result__isset __isset; bool operator == (const ThriftHiveMetastore_drop_index_by_name_result & rhs) const { @@ -3998,11 +4240,18 @@ class ThriftHiveMetastore_drop_index_by_name_result { bool operator < (const ThriftHiveMetastore_drop_index_by_name_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_drop_index_by_name_presult__isset { + _ThriftHiveMetastore_drop_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_drop_index_by_name_presult__isset; + class ThriftHiveMetastore_drop_index_by_name_presult { public: @@ -4013,17 +4262,19 @@ class ThriftHiveMetastore_drop_index_by_name_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_drop_index_by_name_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_index_by_name_args__isset { + _ThriftHiveMetastore_get_index_by_name_args__isset() : db_name(false), tbl_name(false), index_name(false) {} + bool db_name; + bool tbl_name; + bool index_name; +} _ThriftHiveMetastore_get_index_by_name_args__isset; + class ThriftHiveMetastore_get_index_by_name_args { public: @@ -4036,12 +4287,7 @@ class ThriftHiveMetastore_get_index_by_name_args { std::string tbl_name; std::string index_name; - struct __isset { - __isset() : db_name(false), tbl_name(false), index_name(false) {} - bool db_name; - bool tbl_name; - bool index_name; - } __isset; + _ThriftHiveMetastore_get_index_by_name_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_index_by_name_args & rhs) const { @@ -4059,11 +4305,12 @@ class ThriftHiveMetastore_get_index_by_name_args { bool operator < (const ThriftHiveMetastore_get_index_by_name_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_index_by_name_pargs { public: @@ -4074,10 +4321,17 @@ class ThriftHiveMetastore_get_index_by_name_pargs { const std::string* tbl_name; const std::string* index_name; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_index_by_name_result__isset { + _ThriftHiveMetastore_get_index_by_name_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_index_by_name_result__isset; + class ThriftHiveMetastore_get_index_by_name_result { public: @@ -4090,12 +4344,7 @@ class ThriftHiveMetastore_get_index_by_name_result { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_index_by_name_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_index_by_name_result & rhs) const { @@ -4113,11 +4362,18 @@ class ThriftHiveMetastore_get_index_by_name_result { bool operator < (const ThriftHiveMetastore_get_index_by_name_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_index_by_name_presult__isset { + _ThriftHiveMetastore_get_index_by_name_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_index_by_name_presult__isset; + class ThriftHiveMetastore_get_index_by_name_presult { public: @@ -4128,17 +4384,19 @@ class ThriftHiveMetastore_get_index_by_name_presult { MetaException o1; NoSuchObjectException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_index_by_name_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_indexes_args__isset { + _ThriftHiveMetastore_get_indexes_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + bool db_name; + bool tbl_name; + bool max_indexes; +} _ThriftHiveMetastore_get_indexes_args__isset; + class ThriftHiveMetastore_get_indexes_args { public: @@ -4151,12 +4409,7 @@ class ThriftHiveMetastore_get_indexes_args { std::string tbl_name; int16_t max_indexes; - struct __isset { - __isset() : db_name(false), tbl_name(false), max_indexes(false) {} - bool db_name; - bool tbl_name; - bool max_indexes; - } __isset; + _ThriftHiveMetastore_get_indexes_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_indexes_args & rhs) const { @@ -4174,11 +4427,12 @@ class ThriftHiveMetastore_get_indexes_args { bool operator < (const ThriftHiveMetastore_get_indexes_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_indexes_pargs { public: @@ -4189,10 +4443,17 @@ class ThriftHiveMetastore_get_indexes_pargs { const std::string* tbl_name; const int16_t* max_indexes; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_indexes_result__isset { + _ThriftHiveMetastore_get_indexes_result__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_indexes_result__isset; + class ThriftHiveMetastore_get_indexes_result { public: @@ -4205,12 +4466,7 @@ class ThriftHiveMetastore_get_indexes_result { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_indexes_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_indexes_result & rhs) const { @@ -4228,11 +4484,18 @@ class ThriftHiveMetastore_get_indexes_result { bool operator < (const ThriftHiveMetastore_get_indexes_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_indexes_presult__isset { + _ThriftHiveMetastore_get_indexes_presult__isset() : success(false), o1(false), o2(false) {} + bool success; + bool o1; + bool o2; +} _ThriftHiveMetastore_get_indexes_presult__isset; + class ThriftHiveMetastore_get_indexes_presult { public: @@ -4243,17 +4506,19 @@ class ThriftHiveMetastore_get_indexes_presult { NoSuchObjectException o1; MetaException o2; - struct __isset { - __isset() : success(false), o1(false), o2(false) {} - bool success; - bool o1; - bool o2; - } __isset; + _ThriftHiveMetastore_get_indexes_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHiveMetastore_get_index_names_args__isset { + _ThriftHiveMetastore_get_index_names_args__isset() : db_name(false), tbl_name(false), max_indexes(false) {} + bool db_name; + bool tbl_name; + bool max_indexes; +} _ThriftHiveMetastore_get_index_names_args__isset; + class ThriftHiveMetastore_get_index_names_args { public: @@ -4266,12 +4531,7 @@ class ThriftHiveMetastore_get_index_names_args { std::string tbl_name; int16_t max_indexes; - struct __isset { - __isset() : db_name(false), tbl_name(false), max_indexes(false) {} - bool db_name; - bool tbl_name; - bool max_indexes; - } __isset; + _ThriftHiveMetastore_get_index_names_args__isset __isset; bool operator == (const ThriftHiveMetastore_get_index_names_args & rhs) const { @@ -4289,11 +4549,12 @@ class ThriftHiveMetastore_get_index_names_args { bool operator < (const ThriftHiveMetastore_get_index_names_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHiveMetastore_get_index_names_pargs { public: @@ -4304,10 +4565,16 @@ class ThriftHiveMetastore_get_index_names_pargs { const std::string* tbl_name; const int16_t* max_indexes; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_index_names_result__isset { + _ThriftHiveMetastore_get_index_names_result__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_index_names_result__isset; + class ThriftHiveMetastore_get_index_names_result { public: @@ -4319,11 +4586,7 @@ class ThriftHiveMetastore_get_index_names_result { std::vector success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_index_names_result__isset __isset; bool operator == (const ThriftHiveMetastore_get_index_names_result & rhs) const { @@ -4339,11 +4602,17 @@ class ThriftHiveMetastore_get_index_names_result { bool operator < (const ThriftHiveMetastore_get_index_names_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHiveMetastore_get_index_names_presult__isset { + _ThriftHiveMetastore_get_index_names_presult__isset() : success(false), o2(false) {} + bool success; + bool o2; +} _ThriftHiveMetastore_get_index_names_presult__isset; + class ThriftHiveMetastore_get_index_names_presult { public: @@ -4353,26 +4622,22 @@ class ThriftHiveMetastore_get_index_names_presult { std::vector * success; MetaException o2; - struct __isset { - __isset() : success(false), o2(false) {} - bool success; - bool o2; - } __isset; + _ThriftHiveMetastore_get_index_names_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public facebook::fb303::FacebookServiceClient { public: - ThriftHiveMetastoreClient(boost::shared_ptr prot) : + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : facebook::fb303::FacebookServiceClient(prot, prot) {} - ThriftHiveMetastoreClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : + ThriftHiveMetastoreClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : facebook::fb303::FacebookServiceClient(iprot, oprot) {} - boost::shared_ptr getInputProtocol() { + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } - boost::shared_ptr getOutputProtocol() { + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } void create_database(const Database& database); @@ -4491,50 +4756,50 @@ class ThriftHiveMetastoreClient : virtual public ThriftHiveMetastoreIf, public f void recv_get_index_names(std::vector & _return); }; -class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { +class ThriftHiveMetastoreProcessor : virtual public ::apache::thrift::TProcessor, public facebook::fb303::FacebookServiceProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); + virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); private: - std::map processMap_; - void process_create_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_database(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_all_databases(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_create_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_type(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_type_all(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_fields(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_schema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_create_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_all_tables(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_alter_table(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_add_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_append_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_append_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partition_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partitions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partition_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partitions_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partition_names_ps(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_partitions_by_filter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_alter_partition(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_config_value(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_partition_name_to_vals(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_partition_name_to_spec(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_add_index(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_drop_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_index_by_name(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_indexes(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_get_index_names(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + std::map processMap_; + void process_create_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_database(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_all_databases(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_create_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_type(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_type_all(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_fields(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_schema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_create_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_all_tables(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_alter_table(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_add_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_append_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_append_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partitions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partitions_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partition_names_ps(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_partitions_by_filter(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_alter_partition(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_config_value(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_partition_name_to_vals(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_partition_name_to_spec(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_add_index(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_drop_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_index_by_name(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_indexes(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_get_index_names(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); public: ThriftHiveMetastoreProcessor(boost::shared_ptr iface) : facebook::fb303::FacebookServiceProcessor(iface), @@ -4579,7 +4844,7 @@ class ThriftHiveMetastoreProcessor : virtual public apache::thrift::TProcessor, processMap_["get_index_names"] = &ThriftHiveMetastoreProcessor::process_get_index_names; } - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); + virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot); virtual ~ThriftHiveMetastoreProcessor() {} }; diff --git metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp index 66b2fb3..a5a35e7 100644 --- metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp +++ metastore/src/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp @@ -7,10 +7,10 @@ #include #include -using namespace apache::thrift; -using namespace apache::thrift::protocol; -using namespace apache::thrift::transport; -using namespace apache::thrift::server; +using namespace ::apache::thrift; +using namespace ::apache::thrift::protocol; +using namespace ::apache::thrift::transport; +using namespace ::apache::thrift::server; using boost::shared_ptr; diff --git metastore/src/gen-cpp/hive_metastore_types.cpp metastore/src/gen-cpp/hive_metastore_types.cpp index c000db9..a772813 100644 --- metastore/src/gen-cpp/hive_metastore_types.cpp +++ metastore/src/gen-cpp/hive_metastore_types.cpp @@ -10,28 +10,28 @@ namespace Apache { namespace Hadoop { namespace Hive { const char* Version::ascii_fingerprint = "07A9615F837F7D0A952B595DD3020972"; const uint8_t Version::binary_fingerprint[16] = {0x07,0xA9,0x61,0x5F,0x83,0x7F,0x7D,0x0A,0x95,0x2B,0x59,0x5D,0xD3,0x02,0x09,0x72}; -uint32_t Version::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Version::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->version); this->__isset.version = true; } else { @@ -39,7 +39,7 @@ uint32_t Version::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->comments); this->__isset.comments = true; } else { @@ -58,13 +58,13 @@ uint32_t Version::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Version::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Version::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Version"); - xfer += oprot->writeFieldBegin("version", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->version); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("comments", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("comments", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->comments); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -75,28 +75,28 @@ uint32_t Version::write(apache::thrift::protocol::TProtocol* oprot) const { const char* FieldSchema::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271"; const uint8_t FieldSchema::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; -uint32_t FieldSchema::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t FieldSchema::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -104,7 +104,7 @@ uint32_t FieldSchema::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->type); this->__isset.type = true; } else { @@ -112,7 +112,7 @@ uint32_t FieldSchema::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->comment); this->__isset.comment = true; } else { @@ -131,16 +131,16 @@ uint32_t FieldSchema::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t FieldSchema::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t FieldSchema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("FieldSchema"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("type", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("comment", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("comment", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->comment); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -151,28 +151,28 @@ uint32_t FieldSchema::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Type::ascii_fingerprint = "20DF02DE523C27F7066C7BD4D9120842"; const uint8_t Type::binary_fingerprint[16] = {0x20,0xDF,0x02,0xDE,0x52,0x3C,0x27,0xF7,0x06,0x6C,0x7B,0xD4,0xD9,0x12,0x08,0x42}; -uint32_t Type::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Type::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -180,7 +180,7 @@ uint32_t Type::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->type1); this->__isset.type1 = true; } else { @@ -188,7 +188,7 @@ uint32_t Type::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->type2); this->__isset.type2 = true; } else { @@ -196,11 +196,11 @@ uint32_t Type::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fields.clear(); uint32_t _size0; - apache::thrift::protocol::TType _etype3; + ::apache::thrift::protocol::TType _etype3; iprot->readListBegin(_etype3, _size0); this->fields.resize(_size0); uint32_t _i4; @@ -227,26 +227,26 @@ uint32_t Type::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Type::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Type::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Type"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); if (this->__isset.type1) { - xfer += oprot->writeFieldBegin("type1", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("type1", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->type1); xfer += oprot->writeFieldEnd(); } if (this->__isset.type2) { - xfer += oprot->writeFieldBegin("type2", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("type2", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->type2); xfer += oprot->writeFieldEnd(); } if (this->__isset.fields) { - xfer += oprot->writeFieldBegin("fields", apache::thrift::protocol::T_LIST, 4); + xfer += oprot->writeFieldBegin("fields", ::apache::thrift::protocol::T_LIST, 4); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->fields.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->fields.size()); std::vector ::const_iterator _iter5; for (_iter5 = this->fields.begin(); _iter5 != this->fields.end(); ++_iter5) { @@ -264,28 +264,28 @@ uint32_t Type::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Database::ascii_fingerprint = "AB879940BD15B6B25691265F7384B271"; const uint8_t Database::binary_fingerprint[16] = {0xAB,0x87,0x99,0x40,0xBD,0x15,0xB6,0xB2,0x56,0x91,0x26,0x5F,0x73,0x84,0xB2,0x71}; -uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Database::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -293,7 +293,7 @@ uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->description); this->__isset.description = true; } else { @@ -301,7 +301,7 @@ uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->locationUri); this->__isset.locationUri = true; } else { @@ -320,16 +320,16 @@ uint32_t Database::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Database::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Database::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Database"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("description", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("description", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->description); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("locationUri", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("locationUri", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->locationUri); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -340,28 +340,28 @@ uint32_t Database::write(apache::thrift::protocol::TProtocol* oprot) const { const char* SerDeInfo::ascii_fingerprint = "B1021C32A35A2AEFCD2F57A5424159A7"; const uint8_t SerDeInfo::binary_fingerprint[16] = {0xB1,0x02,0x1C,0x32,0xA3,0x5A,0x2A,0xEF,0xCD,0x2F,0x57,0xA5,0x42,0x41,0x59,0xA7}; -uint32_t SerDeInfo::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t SerDeInfo::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->name); this->__isset.name = true; } else { @@ -369,7 +369,7 @@ uint32_t SerDeInfo::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->serializationLib); this->__isset.serializationLib = true; } else { @@ -377,12 +377,12 @@ uint32_t SerDeInfo::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); uint32_t _size6; - apache::thrift::protocol::TType _ktype7; - apache::thrift::protocol::TType _vtype8; + ::apache::thrift::protocol::TType _ktype7; + ::apache::thrift::protocol::TType _vtype8; iprot->readMapBegin(_ktype7, _vtype8, _size6); uint32_t _i10; for (_i10 = 0; _i10 < _size6; ++_i10) @@ -411,18 +411,18 @@ uint32_t SerDeInfo::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t SerDeInfo::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t SerDeInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("SerDeInfo"); - xfer += oprot->writeFieldBegin("name", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("serializationLib", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("serializationLib", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->serializationLib); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("parameters", apache::thrift::protocol::T_MAP, 3); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 3); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->parameters.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); std::map ::const_iterator _iter13; for (_iter13 = this->parameters.begin(); _iter13 != this->parameters.end(); ++_iter13) { @@ -440,28 +440,28 @@ uint32_t SerDeInfo::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Order::ascii_fingerprint = "EEBC915CE44901401D881E6091423036"; const uint8_t Order::binary_fingerprint[16] = {0xEE,0xBC,0x91,0x5C,0xE4,0x49,0x01,0x40,0x1D,0x88,0x1E,0x60,0x91,0x42,0x30,0x36}; -uint32_t Order::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Order::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->col); this->__isset.col = true; } else { @@ -469,7 +469,7 @@ uint32_t Order::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->order); this->__isset.order = true; } else { @@ -488,13 +488,13 @@ uint32_t Order::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Order::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Order::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Order"); - xfer += oprot->writeFieldBegin("col", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("col", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->col); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("order", apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeFieldBegin("order", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->order); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -505,32 +505,32 @@ uint32_t Order::write(apache::thrift::protocol::TProtocol* oprot) const { const char* StorageDescriptor::ascii_fingerprint = "11E4CE18F895C13812C853DFDCD1293F"; const uint8_t StorageDescriptor::binary_fingerprint[16] = {0x11,0xE4,0xCE,0x18,0xF8,0x95,0xC1,0x38,0x12,0xC8,0x53,0xDF,0xDC,0xD1,0x29,0x3F}; -uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t StorageDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->cols.clear(); uint32_t _size14; - apache::thrift::protocol::TType _etype17; + ::apache::thrift::protocol::TType _etype17; iprot->readListBegin(_etype17, _size14); this->cols.resize(_size14); uint32_t _i18; @@ -546,7 +546,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->location); this->__isset.location = true; } else { @@ -554,7 +554,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->inputFormat); this->__isset.inputFormat = true; } else { @@ -562,7 +562,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->outputFormat); this->__isset.outputFormat = true; } else { @@ -570,7 +570,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 5: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->compressed); this->__isset.compressed = true; } else { @@ -578,7 +578,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 6: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->numBuckets); this->__isset.numBuckets = true; } else { @@ -586,7 +586,7 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 7: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->serdeInfo.read(iprot); this->__isset.serdeInfo = true; } else { @@ -594,11 +594,11 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 8: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->bucketCols.clear(); uint32_t _size19; - apache::thrift::protocol::TType _etype22; + ::apache::thrift::protocol::TType _etype22; iprot->readListBegin(_etype22, _size19); this->bucketCols.resize(_size19); uint32_t _i23; @@ -614,11 +614,11 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 9: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->sortCols.clear(); uint32_t _size24; - apache::thrift::protocol::TType _etype27; + ::apache::thrift::protocol::TType _etype27; iprot->readListBegin(_etype27, _size24); this->sortCols.resize(_size24); uint32_t _i28; @@ -634,12 +634,12 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 10: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); uint32_t _size29; - apache::thrift::protocol::TType _ktype30; - apache::thrift::protocol::TType _vtype31; + ::apache::thrift::protocol::TType _ktype30; + ::apache::thrift::protocol::TType _vtype31; iprot->readMapBegin(_ktype30, _vtype31, _size29); uint32_t _i33; for (_i33 = 0; _i33 < _size29; ++_i33) @@ -668,12 +668,12 @@ uint32_t StorageDescriptor::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t StorageDescriptor::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t StorageDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("StorageDescriptor"); - xfer += oprot->writeFieldBegin("cols", apache::thrift::protocol::T_LIST, 1); + xfer += oprot->writeFieldBegin("cols", ::apache::thrift::protocol::T_LIST, 1); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->cols.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->cols.size()); std::vector ::const_iterator _iter36; for (_iter36 = this->cols.begin(); _iter36 != this->cols.end(); ++_iter36) { @@ -682,27 +682,27 @@ uint32_t StorageDescriptor::write(apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("location", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("location", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->location); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("inputFormat", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("inputFormat", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->inputFormat); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("outputFormat", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeFieldBegin("outputFormat", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->outputFormat); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("compressed", apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeFieldBegin("compressed", ::apache::thrift::protocol::T_BOOL, 5); xfer += oprot->writeBool(this->compressed); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("numBuckets", apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeFieldBegin("numBuckets", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->numBuckets); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("serdeInfo", apache::thrift::protocol::T_STRUCT, 7); + xfer += oprot->writeFieldBegin("serdeInfo", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->serdeInfo.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("bucketCols", apache::thrift::protocol::T_LIST, 8); + xfer += oprot->writeFieldBegin("bucketCols", ::apache::thrift::protocol::T_LIST, 8); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->bucketCols.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->bucketCols.size()); std::vector ::const_iterator _iter37; for (_iter37 = this->bucketCols.begin(); _iter37 != this->bucketCols.end(); ++_iter37) { @@ -711,9 +711,9 @@ uint32_t StorageDescriptor::write(apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("sortCols", apache::thrift::protocol::T_LIST, 9); + xfer += oprot->writeFieldBegin("sortCols", ::apache::thrift::protocol::T_LIST, 9); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->sortCols.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->sortCols.size()); std::vector ::const_iterator _iter38; for (_iter38 = this->sortCols.begin(); _iter38 != this->sortCols.end(); ++_iter38) { @@ -722,9 +722,9 @@ uint32_t StorageDescriptor::write(apache::thrift::protocol::TProtocol* oprot) co xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("parameters", apache::thrift::protocol::T_MAP, 10); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 10); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->parameters.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); std::map ::const_iterator _iter39; for (_iter39 = this->parameters.begin(); _iter39 != this->parameters.end(); ++_iter39) { @@ -742,28 +742,28 @@ uint32_t StorageDescriptor::write(apache::thrift::protocol::TProtocol* oprot) co const char* Table::ascii_fingerprint = "F709D087CEEE7C49380296E3B423FF76"; const uint8_t Table::binary_fingerprint[16] = {0xF7,0x09,0xD0,0x87,0xCE,0xEE,0x7C,0x49,0x38,0x02,0x96,0xE3,0xB4,0x23,0xFF,0x76}; -uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Table::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tableName); this->__isset.tableName = true; } else { @@ -771,7 +771,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbName); this->__isset.dbName = true; } else { @@ -779,7 +779,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->owner); this->__isset.owner = true; } else { @@ -787,7 +787,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->createTime); this->__isset.createTime = true; } else { @@ -795,7 +795,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 5: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->lastAccessTime); this->__isset.lastAccessTime = true; } else { @@ -803,7 +803,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 6: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->retention); this->__isset.retention = true; } else { @@ -811,7 +811,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 7: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->sd.read(iprot); this->__isset.sd = true; } else { @@ -819,11 +819,11 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 8: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->partitionKeys.clear(); uint32_t _size40; - apache::thrift::protocol::TType _etype43; + ::apache::thrift::protocol::TType _etype43; iprot->readListBegin(_etype43, _size40); this->partitionKeys.resize(_size40); uint32_t _i44; @@ -839,12 +839,12 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 9: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); uint32_t _size45; - apache::thrift::protocol::TType _ktype46; - apache::thrift::protocol::TType _vtype47; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; iprot->readMapBegin(_ktype46, _vtype47, _size45); uint32_t _i49; for (_i49 = 0; _i49 < _size45; ++_i49) @@ -862,7 +862,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 10: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->viewOriginalText); this->__isset.viewOriginalText = true; } else { @@ -870,7 +870,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 11: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->viewExpandedText); this->__isset.viewExpandedText = true; } else { @@ -878,7 +878,7 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 12: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tableType); this->__isset.tableType = true; } else { @@ -897,33 +897,33 @@ uint32_t Table::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Table::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Table::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Table"); - xfer += oprot->writeFieldBegin("tableName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dbName", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("owner", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("owner", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->owner); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("lastAccessTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("retention", apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeFieldBegin("retention", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->retention); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("sd", apache::thrift::protocol::T_STRUCT, 7); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("partitionKeys", apache::thrift::protocol::T_LIST, 8); + xfer += oprot->writeFieldBegin("partitionKeys", ::apache::thrift::protocol::T_LIST, 8); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->partitionKeys.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->partitionKeys.size()); std::vector ::const_iterator _iter52; for (_iter52 = this->partitionKeys.begin(); _iter52 != this->partitionKeys.end(); ++_iter52) { @@ -932,9 +932,9 @@ uint32_t Table::write(apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("parameters", apache::thrift::protocol::T_MAP, 9); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->parameters.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); std::map ::const_iterator _iter53; for (_iter53 = this->parameters.begin(); _iter53 != this->parameters.end(); ++_iter53) { @@ -944,13 +944,13 @@ uint32_t Table::write(apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("viewOriginalText", apache::thrift::protocol::T_STRING, 10); + xfer += oprot->writeFieldBegin("viewOriginalText", ::apache::thrift::protocol::T_STRING, 10); xfer += oprot->writeString(this->viewOriginalText); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("viewExpandedText", apache::thrift::protocol::T_STRING, 11); + xfer += oprot->writeFieldBegin("viewExpandedText", ::apache::thrift::protocol::T_STRING, 11); xfer += oprot->writeString(this->viewExpandedText); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tableType", apache::thrift::protocol::T_STRING, 12); + xfer += oprot->writeFieldBegin("tableType", ::apache::thrift::protocol::T_STRING, 12); xfer += oprot->writeString(this->tableType); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -961,32 +961,32 @@ uint32_t Table::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Partition::ascii_fingerprint = "E5EDC507CBBC5F6F81AAC4845B38F51B"; const uint8_t Partition::binary_fingerprint[16] = {0xE5,0xED,0xC5,0x07,0xCB,0xBC,0x5F,0x6F,0x81,0xAA,0xC4,0x84,0x5B,0x38,0xF5,0x1B}; -uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Partition::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->values.clear(); uint32_t _size54; - apache::thrift::protocol::TType _etype57; + ::apache::thrift::protocol::TType _etype57; iprot->readListBegin(_etype57, _size54); this->values.resize(_size54); uint32_t _i58; @@ -1002,7 +1002,7 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbName); this->__isset.dbName = true; } else { @@ -1010,7 +1010,7 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->tableName); this->__isset.tableName = true; } else { @@ -1018,7 +1018,7 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->createTime); this->__isset.createTime = true; } else { @@ -1026,7 +1026,7 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 5: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->lastAccessTime); this->__isset.lastAccessTime = true; } else { @@ -1034,7 +1034,7 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 6: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->sd.read(iprot); this->__isset.sd = true; } else { @@ -1042,12 +1042,12 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 7: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); uint32_t _size59; - apache::thrift::protocol::TType _ktype60; - apache::thrift::protocol::TType _vtype61; + ::apache::thrift::protocol::TType _ktype60; + ::apache::thrift::protocol::TType _vtype61; iprot->readMapBegin(_ktype60, _vtype61, _size59); uint32_t _i63; for (_i63 = 0; _i63 < _size59; ++_i63) @@ -1076,12 +1076,12 @@ uint32_t Partition::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Partition::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Partition::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Partition"); - xfer += oprot->writeFieldBegin("values", apache::thrift::protocol::T_LIST, 1); + xfer += oprot->writeFieldBegin("values", ::apache::thrift::protocol::T_LIST, 1); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->values.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->values.size()); std::vector ::const_iterator _iter66; for (_iter66 = this->values.begin(); _iter66 != this->values.end(); ++_iter66) { @@ -1090,24 +1090,24 @@ uint32_t Partition::write(apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dbName", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("tableName", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->tableName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("lastAccessTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("sd", apache::thrift::protocol::T_STRUCT, 6); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 6); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("parameters", apache::thrift::protocol::T_MAP, 7); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 7); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->parameters.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); std::map ::const_iterator _iter67; for (_iter67 = this->parameters.begin(); _iter67 != this->parameters.end(); ++_iter67) { @@ -1125,28 +1125,28 @@ uint32_t Partition::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Index::ascii_fingerprint = "5FEE4F7E28935B644F207D74459F6A29"; const uint8_t Index::binary_fingerprint[16] = {0x5F,0xEE,0x4F,0x7E,0x28,0x93,0x5B,0x64,0x4F,0x20,0x7D,0x74,0x45,0x9F,0x6A,0x29}; -uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Index::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->indexName); this->__isset.indexName = true; } else { @@ -1154,7 +1154,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->indexHandlerClass); this->__isset.indexHandlerClass = true; } else { @@ -1162,7 +1162,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->dbName); this->__isset.dbName = true; } else { @@ -1170,7 +1170,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->origTableName); this->__isset.origTableName = true; } else { @@ -1178,7 +1178,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 5: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->createTime); this->__isset.createTime = true; } else { @@ -1186,7 +1186,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 6: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->lastAccessTime); this->__isset.lastAccessTime = true; } else { @@ -1194,7 +1194,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 7: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->indexTableName); this->__isset.indexTableName = true; } else { @@ -1202,7 +1202,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 8: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->sd.read(iprot); this->__isset.sd = true; } else { @@ -1210,12 +1210,12 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 9: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->parameters.clear(); uint32_t _size68; - apache::thrift::protocol::TType _ktype69; - apache::thrift::protocol::TType _vtype70; + ::apache::thrift::protocol::TType _ktype69; + ::apache::thrift::protocol::TType _vtype70; iprot->readMapBegin(_ktype69, _vtype70, _size68); uint32_t _i72; for (_i72 = 0; _i72 < _size68; ++_i72) @@ -1233,7 +1233,7 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 10: - if (ftype == apache::thrift::protocol::T_BOOL) { + if (ftype == ::apache::thrift::protocol::T_BOOL) { xfer += iprot->readBool(this->deferredRebuild); this->__isset.deferredRebuild = true; } else { @@ -1252,36 +1252,36 @@ uint32_t Index::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Index::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Index::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Index"); - xfer += oprot->writeFieldBegin("indexName", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("indexName", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->indexName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("indexHandlerClass", apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeFieldBegin("indexHandlerClass", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->indexHandlerClass); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("dbName", apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeFieldBegin("dbName", ::apache::thrift::protocol::T_STRING, 3); xfer += oprot->writeString(this->dbName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("origTableName", apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeFieldBegin("origTableName", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->origTableName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("createTime", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeFieldBegin("createTime", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->createTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("lastAccessTime", apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeFieldBegin("lastAccessTime", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->lastAccessTime); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("indexTableName", apache::thrift::protocol::T_STRING, 7); + xfer += oprot->writeFieldBegin("indexTableName", ::apache::thrift::protocol::T_STRING, 7); xfer += oprot->writeString(this->indexTableName); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("sd", apache::thrift::protocol::T_STRUCT, 8); + xfer += oprot->writeFieldBegin("sd", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->sd.write(oprot); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("parameters", apache::thrift::protocol::T_MAP, 9); + xfer += oprot->writeFieldBegin("parameters", ::apache::thrift::protocol::T_MAP, 9); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->parameters.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->parameters.size()); std::map ::const_iterator _iter75; for (_iter75 = this->parameters.begin(); _iter75 != this->parameters.end(); ++_iter75) { @@ -1291,7 +1291,7 @@ uint32_t Index::write(apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeMapEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("deferredRebuild", apache::thrift::protocol::T_BOOL, 10); + xfer += oprot->writeFieldBegin("deferredRebuild", ::apache::thrift::protocol::T_BOOL, 10); xfer += oprot->writeBool(this->deferredRebuild); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1302,32 +1302,32 @@ uint32_t Index::write(apache::thrift::protocol::TProtocol* oprot) const { const char* Schema::ascii_fingerprint = "5CFEE46C975F4E2368D905109B8E3B5B"; const uint8_t Schema::binary_fingerprint[16] = {0x5C,0xFE,0xE4,0x6C,0x97,0x5F,0x4E,0x23,0x68,0xD9,0x05,0x10,0x9B,0x8E,0x3B,0x5B}; -uint32_t Schema::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t Schema::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->fieldSchemas.clear(); uint32_t _size76; - apache::thrift::protocol::TType _etype79; + ::apache::thrift::protocol::TType _etype79; iprot->readListBegin(_etype79, _size76); this->fieldSchemas.resize(_size76); uint32_t _i80; @@ -1343,12 +1343,12 @@ uint32_t Schema::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_MAP) { + if (ftype == ::apache::thrift::protocol::T_MAP) { { this->properties.clear(); uint32_t _size81; - apache::thrift::protocol::TType _ktype82; - apache::thrift::protocol::TType _vtype83; + ::apache::thrift::protocol::TType _ktype82; + ::apache::thrift::protocol::TType _vtype83; iprot->readMapBegin(_ktype82, _vtype83, _size81); uint32_t _i85; for (_i85 = 0; _i85 < _size81; ++_i85) @@ -1377,12 +1377,12 @@ uint32_t Schema::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t Schema::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t Schema::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("Schema"); - xfer += oprot->writeFieldBegin("fieldSchemas", apache::thrift::protocol::T_LIST, 1); + xfer += oprot->writeFieldBegin("fieldSchemas", ::apache::thrift::protocol::T_LIST, 1); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRUCT, this->fieldSchemas.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->fieldSchemas.size()); std::vector ::const_iterator _iter88; for (_iter88 = this->fieldSchemas.begin(); _iter88 != this->fieldSchemas.end(); ++_iter88) { @@ -1391,9 +1391,9 @@ uint32_t Schema::write(apache::thrift::protocol::TProtocol* oprot) const { xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("properties", apache::thrift::protocol::T_MAP, 2); + xfer += oprot->writeFieldBegin("properties", ::apache::thrift::protocol::T_MAP, 2); { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->properties.size()); + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->properties.size()); std::map ::const_iterator _iter89; for (_iter89 = this->properties.begin(); _iter89 != this->properties.end(); ++_iter89) { @@ -1411,28 +1411,28 @@ uint32_t Schema::write(apache::thrift::protocol::TProtocol* oprot) const { const char* MetaException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t MetaException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t MetaException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t MetaException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1451,10 +1451,10 @@ uint32_t MetaException::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t MetaException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t MetaException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("MetaException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1465,28 +1465,28 @@ uint32_t MetaException::write(apache::thrift::protocol::TProtocol* oprot) const const char* UnknownTableException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownTableException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t UnknownTableException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t UnknownTableException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1505,10 +1505,10 @@ uint32_t UnknownTableException::read(apache::thrift::protocol::TProtocol* iprot) return xfer; } -uint32_t UnknownTableException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t UnknownTableException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownTableException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1519,28 +1519,28 @@ uint32_t UnknownTableException::write(apache::thrift::protocol::TProtocol* oprot const char* UnknownDBException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t UnknownDBException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t UnknownDBException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t UnknownDBException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1559,10 +1559,10 @@ uint32_t UnknownDBException::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t UnknownDBException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t UnknownDBException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("UnknownDBException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1573,28 +1573,28 @@ uint32_t UnknownDBException::write(apache::thrift::protocol::TProtocol* oprot) c const char* AlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t AlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t AlreadyExistsException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t AlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1613,10 +1613,10 @@ uint32_t AlreadyExistsException::read(apache::thrift::protocol::TProtocol* iprot return xfer; } -uint32_t AlreadyExistsException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t AlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("AlreadyExistsException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1627,28 +1627,28 @@ uint32_t AlreadyExistsException::write(apache::thrift::protocol::TProtocol* opro const char* InvalidObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t InvalidObjectException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t InvalidObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1667,10 +1667,10 @@ uint32_t InvalidObjectException::read(apache::thrift::protocol::TProtocol* iprot return xfer; } -uint32_t InvalidObjectException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t InvalidObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidObjectException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1681,28 +1681,28 @@ uint32_t InvalidObjectException::write(apache::thrift::protocol::TProtocol* opro const char* NoSuchObjectException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t NoSuchObjectException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t NoSuchObjectException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t NoSuchObjectException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1721,10 +1721,10 @@ uint32_t NoSuchObjectException::read(apache::thrift::protocol::TProtocol* iprot) return xfer; } -uint32_t NoSuchObjectException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t NoSuchObjectException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("NoSuchObjectException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1735,28 +1735,28 @@ uint32_t NoSuchObjectException::write(apache::thrift::protocol::TProtocol* oprot const char* IndexAlreadyExistsException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t IndexAlreadyExistsException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t IndexAlreadyExistsException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t IndexAlreadyExistsException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1775,10 +1775,10 @@ uint32_t IndexAlreadyExistsException::read(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t IndexAlreadyExistsException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t IndexAlreadyExistsException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("IndexAlreadyExistsException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1789,28 +1789,28 @@ uint32_t IndexAlreadyExistsException::write(apache::thrift::protocol::TProtocol* const char* InvalidOperationException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t InvalidOperationException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t InvalidOperationException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t InvalidOperationException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1829,10 +1829,10 @@ uint32_t InvalidOperationException::read(apache::thrift::protocol::TProtocol* ip return xfer; } -uint32_t InvalidOperationException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t InvalidOperationException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("InvalidOperationException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -1843,28 +1843,28 @@ uint32_t InvalidOperationException::write(apache::thrift::protocol::TProtocol* o const char* ConfigValSecurityException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; const uint8_t ConfigValSecurityException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; -uint32_t ConfigValSecurityException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ConfigValSecurityException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { @@ -1883,10 +1883,10 @@ uint32_t ConfigValSecurityException::read(apache::thrift::protocol::TProtocol* i return xfer; } -uint32_t ConfigValSecurityException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ConfigValSecurityException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ConfigValSecurityException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); diff --git metastore/src/gen-cpp/hive_metastore_types.h metastore/src/gen-cpp/hive_metastore_types.h index f6cd7e5..78d7f4b 100644 --- metastore/src/gen-cpp/hive_metastore_types.h +++ metastore/src/gen-cpp/hive_metastore_types.h @@ -7,6 +7,7 @@ #define hive_metastore_TYPES_H #include +#include #include #include @@ -15,6 +16,12 @@ namespace Apache { namespace Hadoop { namespace Hive { +typedef struct _Version__isset { + _Version__isset() : version(false), comments(false) {} + bool version; + bool comments; +} _Version__isset; + class Version { public: @@ -29,11 +36,7 @@ class Version { std::string version; std::string comments; - struct __isset { - __isset() : version(false), comments(false) {} - bool version; - bool comments; - } __isset; + _Version__isset __isset; bool operator == (const Version & rhs) const { @@ -49,11 +52,18 @@ class Version { bool operator < (const Version & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _FieldSchema__isset { + _FieldSchema__isset() : name(false), type(false), comment(false) {} + bool name; + bool type; + bool comment; +} _FieldSchema__isset; + class FieldSchema { public: @@ -69,12 +79,7 @@ class FieldSchema { std::string type; std::string comment; - struct __isset { - __isset() : name(false), type(false), comment(false) {} - bool name; - bool type; - bool comment; - } __isset; + _FieldSchema__isset __isset; bool operator == (const FieldSchema & rhs) const { @@ -92,11 +97,19 @@ class FieldSchema { bool operator < (const FieldSchema & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Type__isset { + _Type__isset() : name(false), type1(false), type2(false), fields(false) {} + bool name; + bool type1; + bool type2; + bool fields; +} _Type__isset; + class Type { public: @@ -113,13 +126,7 @@ class Type { std::string type2; std::vector fields; - struct __isset { - __isset() : name(false), type1(false), type2(false), fields(false) {} - bool name; - bool type1; - bool type2; - bool fields; - } __isset; + _Type__isset __isset; bool operator == (const Type & rhs) const { @@ -145,11 +152,18 @@ class Type { bool operator < (const Type & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Database__isset { + _Database__isset() : name(false), description(false), locationUri(false) {} + bool name; + bool description; + bool locationUri; +} _Database__isset; + class Database { public: @@ -165,12 +179,7 @@ class Database { std::string description; std::string locationUri; - struct __isset { - __isset() : name(false), description(false), locationUri(false) {} - bool name; - bool description; - bool locationUri; - } __isset; + _Database__isset __isset; bool operator == (const Database & rhs) const { @@ -188,11 +197,18 @@ class Database { bool operator < (const Database & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _SerDeInfo__isset { + _SerDeInfo__isset() : name(false), serializationLib(false), parameters(false) {} + bool name; + bool serializationLib; + bool parameters; +} _SerDeInfo__isset; + class SerDeInfo { public: @@ -208,12 +224,7 @@ class SerDeInfo { std::string serializationLib; std::map parameters; - struct __isset { - __isset() : name(false), serializationLib(false), parameters(false) {} - bool name; - bool serializationLib; - bool parameters; - } __isset; + _SerDeInfo__isset __isset; bool operator == (const SerDeInfo & rhs) const { @@ -231,11 +242,17 @@ class SerDeInfo { bool operator < (const SerDeInfo & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Order__isset { + _Order__isset() : col(false), order(false) {} + bool col; + bool order; +} _Order__isset; + class Order { public: @@ -250,11 +267,7 @@ class Order { std::string col; int32_t order; - struct __isset { - __isset() : col(false), order(false) {} - bool col; - bool order; - } __isset; + _Order__isset __isset; bool operator == (const Order & rhs) const { @@ -270,11 +283,25 @@ class Order { bool operator < (const Order & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _StorageDescriptor__isset { + _StorageDescriptor__isset() : cols(false), location(false), inputFormat(false), outputFormat(false), compressed(false), numBuckets(false), serdeInfo(false), bucketCols(false), sortCols(false), parameters(false) {} + bool cols; + bool location; + bool inputFormat; + bool outputFormat; + bool compressed; + bool numBuckets; + bool serdeInfo; + bool bucketCols; + bool sortCols; + bool parameters; +} _StorageDescriptor__isset; + class StorageDescriptor { public: @@ -297,19 +324,7 @@ class StorageDescriptor { std::vector sortCols; std::map parameters; - struct __isset { - __isset() : cols(false), location(false), inputFormat(false), outputFormat(false), compressed(false), numBuckets(false), serdeInfo(false), bucketCols(false), sortCols(false), parameters(false) {} - bool cols; - bool location; - bool inputFormat; - bool outputFormat; - bool compressed; - bool numBuckets; - bool serdeInfo; - bool bucketCols; - bool sortCols; - bool parameters; - } __isset; + _StorageDescriptor__isset __isset; bool operator == (const StorageDescriptor & rhs) const { @@ -341,11 +356,27 @@ class StorageDescriptor { bool operator < (const StorageDescriptor & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Table__isset { + _Table__isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false) {} + bool tableName; + bool dbName; + bool owner; + bool createTime; + bool lastAccessTime; + bool retention; + bool sd; + bool partitionKeys; + bool parameters; + bool viewOriginalText; + bool viewExpandedText; + bool tableType; +} _Table__isset; + class Table { public: @@ -370,21 +401,7 @@ class Table { std::string viewExpandedText; std::string tableType; - struct __isset { - __isset() : tableName(false), dbName(false), owner(false), createTime(false), lastAccessTime(false), retention(false), sd(false), partitionKeys(false), parameters(false), viewOriginalText(false), viewExpandedText(false), tableType(false) {} - bool tableName; - bool dbName; - bool owner; - bool createTime; - bool lastAccessTime; - bool retention; - bool sd; - bool partitionKeys; - bool parameters; - bool viewOriginalText; - bool viewExpandedText; - bool tableType; - } __isset; + _Table__isset __isset; bool operator == (const Table & rhs) const { @@ -420,11 +437,22 @@ class Table { bool operator < (const Table & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Partition__isset { + _Partition__isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false) {} + bool values; + bool dbName; + bool tableName; + bool createTime; + bool lastAccessTime; + bool sd; + bool parameters; +} _Partition__isset; + class Partition { public: @@ -444,16 +472,7 @@ class Partition { StorageDescriptor sd; std::map parameters; - struct __isset { - __isset() : values(false), dbName(false), tableName(false), createTime(false), lastAccessTime(false), sd(false), parameters(false) {} - bool values; - bool dbName; - bool tableName; - bool createTime; - bool lastAccessTime; - bool sd; - bool parameters; - } __isset; + _Partition__isset __isset; bool operator == (const Partition & rhs) const { @@ -479,11 +498,25 @@ class Partition { bool operator < (const Partition & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _Index__isset { + _Index__isset() : indexName(false), indexHandlerClass(false), dbName(false), origTableName(false), createTime(false), lastAccessTime(false), indexTableName(false), sd(false), parameters(false), deferredRebuild(false) {} + bool indexName; + bool indexHandlerClass; + bool dbName; + bool origTableName; + bool createTime; + bool lastAccessTime; + bool indexTableName; + bool sd; + bool parameters; + bool deferredRebuild; +} _Index__isset; + class Index { public: @@ -506,19 +539,7 @@ class Index { std::map parameters; bool deferredRebuild; - struct __isset { - __isset() : indexName(false), indexHandlerClass(false), dbName(false), origTableName(false), createTime(false), lastAccessTime(false), indexTableName(false), sd(false), parameters(false), deferredRebuild(false) {} - bool indexName; - bool indexHandlerClass; - bool dbName; - bool origTableName; - bool createTime; - bool lastAccessTime; - bool indexTableName; - bool sd; - bool parameters; - bool deferredRebuild; - } __isset; + _Index__isset __isset; bool operator == (const Index & rhs) const { @@ -550,11 +571,17 @@ class Index { bool operator < (const Index & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) 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; + bool properties; +} _Schema__isset; + class Schema { public: @@ -569,11 +596,7 @@ class Schema { std::vector fieldSchemas; std::map properties; - struct __isset { - __isset() : fieldSchemas(false), properties(false) {} - bool fieldSchemas; - bool properties; - } __isset; + _Schema__isset __isset; bool operator == (const Schema & rhs) const { @@ -589,12 +612,17 @@ class Schema { bool operator < (const Schema & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class MetaException : public apache::thrift::TException { +typedef struct _MetaException__isset { + _MetaException__isset() : message(false) {} + bool message; +} _MetaException__isset; + +class MetaException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -607,10 +635,7 @@ class MetaException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _MetaException__isset __isset; bool operator == (const MetaException & rhs) const { @@ -624,12 +649,17 @@ class MetaException : public apache::thrift::TException { bool operator < (const MetaException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class UnknownTableException : public apache::thrift::TException { +typedef struct _UnknownTableException__isset { + _UnknownTableException__isset() : message(false) {} + bool message; +} _UnknownTableException__isset; + +class UnknownTableException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -642,10 +672,7 @@ class UnknownTableException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _UnknownTableException__isset __isset; bool operator == (const UnknownTableException & rhs) const { @@ -659,12 +686,17 @@ class UnknownTableException : public apache::thrift::TException { bool operator < (const UnknownTableException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class UnknownDBException : public apache::thrift::TException { +typedef struct _UnknownDBException__isset { + _UnknownDBException__isset() : message(false) {} + bool message; +} _UnknownDBException__isset; + +class UnknownDBException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -677,10 +709,7 @@ class UnknownDBException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _UnknownDBException__isset __isset; bool operator == (const UnknownDBException & rhs) const { @@ -694,12 +723,17 @@ class UnknownDBException : public apache::thrift::TException { bool operator < (const UnknownDBException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class AlreadyExistsException : public apache::thrift::TException { +typedef struct _AlreadyExistsException__isset { + _AlreadyExistsException__isset() : message(false) {} + bool message; +} _AlreadyExistsException__isset; + +class AlreadyExistsException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -712,10 +746,7 @@ class AlreadyExistsException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _AlreadyExistsException__isset __isset; bool operator == (const AlreadyExistsException & rhs) const { @@ -729,12 +760,17 @@ class AlreadyExistsException : public apache::thrift::TException { bool operator < (const AlreadyExistsException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class InvalidObjectException : public apache::thrift::TException { +typedef struct _InvalidObjectException__isset { + _InvalidObjectException__isset() : message(false) {} + bool message; +} _InvalidObjectException__isset; + +class InvalidObjectException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -747,10 +783,7 @@ class InvalidObjectException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _InvalidObjectException__isset __isset; bool operator == (const InvalidObjectException & rhs) const { @@ -764,12 +797,17 @@ class InvalidObjectException : public apache::thrift::TException { bool operator < (const InvalidObjectException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class NoSuchObjectException : public apache::thrift::TException { +typedef struct _NoSuchObjectException__isset { + _NoSuchObjectException__isset() : message(false) {} + bool message; +} _NoSuchObjectException__isset; + +class NoSuchObjectException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -782,10 +820,7 @@ class NoSuchObjectException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _NoSuchObjectException__isset __isset; bool operator == (const NoSuchObjectException & rhs) const { @@ -799,12 +834,17 @@ class NoSuchObjectException : public apache::thrift::TException { bool operator < (const NoSuchObjectException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class IndexAlreadyExistsException : public apache::thrift::TException { +typedef struct _IndexAlreadyExistsException__isset { + _IndexAlreadyExistsException__isset() : message(false) {} + bool message; +} _IndexAlreadyExistsException__isset; + +class IndexAlreadyExistsException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -817,10 +857,7 @@ class IndexAlreadyExistsException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _IndexAlreadyExistsException__isset __isset; bool operator == (const IndexAlreadyExistsException & rhs) const { @@ -834,12 +871,17 @@ class IndexAlreadyExistsException : public apache::thrift::TException { bool operator < (const IndexAlreadyExistsException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class InvalidOperationException : public apache::thrift::TException { +typedef struct _InvalidOperationException__isset { + _InvalidOperationException__isset() : message(false) {} + bool message; +} _InvalidOperationException__isset; + +class InvalidOperationException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -852,10 +894,7 @@ class InvalidOperationException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _InvalidOperationException__isset __isset; bool operator == (const InvalidOperationException & rhs) const { @@ -869,12 +908,17 @@ class InvalidOperationException : public apache::thrift::TException { bool operator < (const InvalidOperationException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class ConfigValSecurityException : public apache::thrift::TException { +typedef struct _ConfigValSecurityException__isset { + _ConfigValSecurityException__isset() : message(false) {} + bool message; +} _ConfigValSecurityException__isset; + +class ConfigValSecurityException : public ::apache::thrift::TException { public: static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; @@ -887,10 +931,7 @@ class ConfigValSecurityException : public apache::thrift::TException { std::string message; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _ConfigValSecurityException__isset __isset; bool operator == (const ConfigValSecurityException & rhs) const { @@ -904,8 +945,8 @@ class ConfigValSecurityException : public apache::thrift::TException { bool operator < (const ConfigValSecurityException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java index da48608..b99801a 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class AlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class AlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("AlreadyExistsException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(AlreadyExistsException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. } } - @Override - public AlreadyExistsException clone() { + public AlreadyExistsException deepCopy() { return new AlreadyExistsException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. return 0; } + public int compareTo(AlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + AlreadyExistsException typedOther = (AlreadyExistsException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java index 7245722..a290841 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ConfigValSecurityException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class ConfigValSecurityException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class ConfigValSecurityException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("ConfigValSecurityException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(ConfigValSecurityException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class ConfigValSecurityException extends Exception implements TBase, java } } - @Override - public ConfigValSecurityException clone() { + public ConfigValSecurityException deepCopy() { return new ConfigValSecurityException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class ConfigValSecurityException extends Exception implements TBase, java this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class ConfigValSecurityException extends Exception implements TBase, java } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class ConfigValSecurityException extends Exception implements TBase, java return 0; } + public int compareTo(ConfigValSecurityException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ConfigValSecurityException typedOther = (ConfigValSecurityException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class ConfigValSecurityException extends Exception implements TBase, java if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class ConfigValSecurityException extends Exception implements TBase, java break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class ConfigValSecurityException extends Exception implements TBase, java public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java index de0dfbb..b980a47 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java @@ -9,10 +9,16 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class Constants { diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java index e916cb8..6ae0c46 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java @@ -9,42 +9,110 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Database implements TBase, java.io.Serializable, Cloneable { +public class Database implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Database"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2); private static final TField LOCATION_URI_FIELD_DESC = new TField("locationUri", TType.STRING, (short)3); private String name; - public static final int NAME = 1; private String description; - public static final int DESCRIPTION = 2; private String locationUri; - public static final int LOCATIONURI = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + DESCRIPTION((short)2, "description"), + LOCATION_URI((short)3, "locationUri"); + + 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: // NAME + return NAME; + case 2: // DESCRIPTION + return DESCRIPTION; + case 3: // LOCATION_URI + return LOCATION_URI; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(LOCATIONURI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LOCATION_URI, new FieldMetaData("locationUri", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap); } @@ -77,11 +145,17 @@ public class Database implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Database clone() { + public Database deepCopy() { return new Database(this); } + @Override + public void clear() { + this.name = null; + this.description = null; + this.locationUri = null; + } + public String getName() { return this.name; } @@ -94,11 +168,17 @@ public class Database implements TBase, java.io.Serializable, Cloneable { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public String getDescription() { return this.description; } @@ -111,11 +191,17 @@ public class Database implements TBase, java.io.Serializable, Cloneable { this.description = null; } - // Returns true if field description is set (has been asigned a value) and false otherwise + /** Returns true if field description is set (has been asigned a value) and false otherwise */ public boolean isSetDescription() { return this.description != null; } + public void setDescriptionIsSet(boolean value) { + if (!value) { + this.description = null; + } + } + public String getLocationUri() { return this.locationUri; } @@ -128,13 +214,19 @@ public class Database implements TBase, java.io.Serializable, Cloneable { this.locationUri = null; } - // Returns true if field locationUri is set (has been asigned a value) and false otherwise + /** Returns true if field locationUri is set (has been asigned a value) and false otherwise */ public boolean isSetLocationUri() { return this.locationUri != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setLocationUriIsSet(boolean value) { + if (!value) { + this.locationUri = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -151,7 +243,7 @@ public class Database implements TBase, java.io.Serializable, Cloneable { } break; - case LOCATIONURI: + case LOCATION_URI: if (value == null) { unsetLocationUri(); } else { @@ -159,39 +251,39 @@ public class Database implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); case DESCRIPTION: return getDescription(); - case LOCATIONURI: + case LOCATION_URI: return getLocationUri(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); case DESCRIPTION: return isSetDescription(); - case LOCATIONURI: + case LOCATION_URI: return isSetLocationUri(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -242,6 +334,51 @@ public class Database implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Database other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Database typedOther = (Database)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDescription()) { + lastComparison = TBaseHelper.compareTo(this.description, typedOther.description); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocationUri()).compareTo(typedOther.isSetLocationUri()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocationUri()) { + lastComparison = TBaseHelper.compareTo(this.locationUri, typedOther.locationUri); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -251,23 +388,22 @@ public class Database implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DESCRIPTION: + case 2: // DESCRIPTION if (field.type == TType.STRING) { this.description = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case LOCATIONURI: + case 3: // LOCATION_URI if (field.type == TType.STRING) { this.locationUri = iprot.readString(); } else { @@ -276,12 +412,10 @@ public class Database implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -342,7 +476,6 @@ public class Database implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java index 065f371..de93135 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java @@ -9,42 +9,110 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class FieldSchema implements TBase, java.io.Serializable, Cloneable { +public class FieldSchema implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("FieldSchema"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)2); private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)3); private String name; - public static final int NAME = 1; private String type; - public static final int TYPE = 2; private String comment; - public static final int COMMENT = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + TYPE((short)2, "type"), + COMMENT((short)3, "comment"); + + 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: // NAME + return NAME; + case 2: // TYPE + return TYPE; + case 3: // COMMENT + return COMMENT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap); } @@ -77,11 +145,17 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { } } - @Override - public FieldSchema clone() { + public FieldSchema deepCopy() { return new FieldSchema(this); } + @Override + public void clear() { + this.name = null; + this.type = null; + this.comment = null; + } + public String getName() { return this.name; } @@ -94,11 +168,17 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public String getType() { return this.type; } @@ -111,11 +191,17 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { this.type = null; } - // Returns true if field type is set (has been asigned a value) and false otherwise + /** Returns true if field type is set (has been asigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + public String getComment() { return this.comment; } @@ -128,13 +214,19 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { this.comment = null; } - // Returns true if field comment is set (has been asigned a value) and false otherwise + /** Returns true if field comment is set (has been asigned a value) and false otherwise */ public boolean isSetComment() { return this.comment != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setCommentIsSet(boolean value) { + if (!value) { + this.comment = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -159,13 +251,11 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); @@ -175,23 +265,25 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { case COMMENT: return getComment(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); case TYPE: return isSetType(); case COMMENT: return isSetComment(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -242,6 +334,51 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(FieldSchema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + FieldSchema typedOther = (FieldSchema)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComment()) { + lastComparison = TBaseHelper.compareTo(this.comment, typedOther.comment); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -251,23 +388,22 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TYPE: + case 2: // TYPE if (field.type == TType.STRING) { this.type = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case COMMENT: + case 3: // COMMENT if (field.type == TType.STRING) { this.comment = iprot.readString(); } else { @@ -276,12 +412,10 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -342,7 +476,6 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java index 12a3dd2..e78654f 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Index implements TBase, java.io.Serializable, Cloneable { +public class Index implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Index"); + private static final TField INDEX_NAME_FIELD_DESC = new TField("indexName", TType.STRING, (short)1); private static final TField INDEX_HANDLER_CLASS_FIELD_DESC = new TField("indexHandlerClass", TType.STRING, (short)2); private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)3); @@ -32,59 +41,133 @@ public class Index implements TBase, java.io.Serializable, Cloneable { private static final TField DEFERRED_REBUILD_FIELD_DESC = new TField("deferredRebuild", TType.BOOL, (short)10); private String indexName; - public static final int INDEXNAME = 1; private String indexHandlerClass; - public static final int INDEXHANDLERCLASS = 2; private String dbName; - public static final int DBNAME = 3; private String origTableName; - public static final int ORIGTABLENAME = 4; private int createTime; - public static final int CREATETIME = 5; private int lastAccessTime; - public static final int LASTACCESSTIME = 6; private String indexTableName; - public static final int INDEXTABLENAME = 7; private StorageDescriptor sd; - public static final int SD = 8; private Map parameters; - public static final int PARAMETERS = 9; private boolean deferredRebuild; - public static final int DEFERREDREBUILD = 10; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean createTime = false; - public boolean lastAccessTime = false; - public boolean deferredRebuild = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + INDEX_NAME((short)1, "indexName"), + INDEX_HANDLER_CLASS((short)2, "indexHandlerClass"), + DB_NAME((short)3, "dbName"), + ORIG_TABLE_NAME((short)4, "origTableName"), + CREATE_TIME((short)5, "createTime"), + LAST_ACCESS_TIME((short)6, "lastAccessTime"), + INDEX_TABLE_NAME((short)7, "indexTableName"), + SD((short)8, "sd"), + PARAMETERS((short)9, "parameters"), + DEFERRED_REBUILD((short)10, "deferredRebuild"); + + 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: // INDEX_NAME + return INDEX_NAME; + case 2: // INDEX_HANDLER_CLASS + return INDEX_HANDLER_CLASS; + case 3: // DB_NAME + return DB_NAME; + case 4: // ORIG_TABLE_NAME + return ORIG_TABLE_NAME; + case 5: // CREATE_TIME + return CREATE_TIME; + case 6: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 7: // INDEX_TABLE_NAME + return INDEX_TABLE_NAME; + case 8: // SD + return SD; + case 9: // PARAMETERS + return PARAMETERS; + case 10: // DEFERRED_REBUILD + return DEFERRED_REBUILD; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(INDEXNAME, new FieldMetaData("indexName", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private static final int __DEFERREDREBUILD_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("indexName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(INDEXHANDLERCLASS, new FieldMetaData("indexHandlerClass", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INDEX_HANDLER_CLASS, new FieldMetaData("indexHandlerClass", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(ORIGTABLENAME, new FieldMetaData("origTableName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.ORIG_TABLE_NAME, new FieldMetaData("origTableName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(INDEXTABLENAME, new FieldMetaData("indexTableName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INDEX_TABLE_NAME, new FieldMetaData("indexTableName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(DEFERREDREBUILD, new FieldMetaData("deferredRebuild", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DEFERRED_REBUILD, new FieldMetaData("deferredRebuild", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap); } @@ -109,20 +192,22 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.dbName = dbName; this.origTableName = origTableName; this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); this.indexTableName = indexTableName; this.sd = sd; this.parameters = parameters; this.deferredRebuild = deferredRebuild; - this.__isset.deferredRebuild = true; + setDeferredRebuildIsSet(true); } /** * Performs a deep copy on other. */ public Index(Index other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetIndexName()) { this.indexName = other.indexName; } @@ -135,9 +220,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { if (other.isSetOrigTableName()) { this.origTableName = other.origTableName; } - __isset.createTime = other.__isset.createTime; this.createTime = other.createTime; - __isset.lastAccessTime = other.__isset.lastAccessTime; this.lastAccessTime = other.lastAccessTime; if (other.isSetIndexTableName()) { this.indexTableName = other.indexTableName; @@ -160,15 +243,30 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } this.parameters = __this__parameters; } - __isset.deferredRebuild = other.__isset.deferredRebuild; this.deferredRebuild = other.deferredRebuild; } - @Override - public Index clone() { + public Index deepCopy() { return new Index(this); } + @Override + public void clear() { + this.indexName = null; + this.indexHandlerClass = null; + this.dbName = null; + this.origTableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.indexTableName = null; + this.sd = null; + this.parameters = null; + setDeferredRebuildIsSet(false); + this.deferredRebuild = false; + } + public String getIndexName() { return this.indexName; } @@ -181,11 +279,17 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.indexName = null; } - // Returns true if field indexName is set (has been asigned a value) and false otherwise + /** Returns true if field indexName is set (has been asigned a value) and false otherwise */ public boolean isSetIndexName() { return this.indexName != null; } + public void setIndexNameIsSet(boolean value) { + if (!value) { + this.indexName = null; + } + } + public String getIndexHandlerClass() { return this.indexHandlerClass; } @@ -198,11 +302,17 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.indexHandlerClass = null; } - // Returns true if field indexHandlerClass is set (has been asigned a value) and false otherwise + /** Returns true if field indexHandlerClass is set (has been asigned a value) and false otherwise */ public boolean isSetIndexHandlerClass() { return this.indexHandlerClass != null; } + public void setIndexHandlerClassIsSet(boolean value) { + if (!value) { + this.indexHandlerClass = null; + } + } + public String getDbName() { return this.dbName; } @@ -215,11 +325,17 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.dbName = null; } - // Returns true if field dbName is set (has been asigned a value) and false otherwise + /** Returns true if field dbName is set (has been asigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + public String getOrigTableName() { return this.origTableName; } @@ -232,27 +348,37 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.origTableName = null; } - // Returns true if field origTableName is set (has been asigned a value) and false otherwise + /** Returns true if field origTableName is set (has been asigned a value) and false otherwise */ public boolean isSetOrigTableName() { return this.origTableName != null; } + public void setOrigTableNameIsSet(boolean value) { + if (!value) { + this.origTableName = null; + } + } + public int getCreateTime() { return this.createTime; } public void setCreateTime(int createTime) { this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); } public void unsetCreateTime() { - this.__isset.createTime = false; + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); } - // Returns true if field createTime is set (has been asigned a value) and false otherwise + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ public boolean isSetCreateTime() { - return this.__isset.createTime; + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -261,16 +387,20 @@ public class Index implements TBase, java.io.Serializable, Cloneable { public void setLastAccessTime(int lastAccessTime) { this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); } - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); } public String getIndexTableName() { @@ -285,11 +415,17 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.indexTableName = null; } - // Returns true if field indexTableName is set (has been asigned a value) and false otherwise + /** Returns true if field indexTableName is set (has been asigned a value) and false otherwise */ public boolean isSetIndexTableName() { return this.indexTableName != null; } + public void setIndexTableNameIsSet(boolean value) { + if (!value) { + this.indexTableName = null; + } + } + public StorageDescriptor getSd() { return this.sd; } @@ -302,11 +438,17 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.sd = null; } - // Returns true if field sd is set (has been asigned a value) and false otherwise + /** Returns true if field sd is set (has been asigned a value) and false otherwise */ public boolean isSetSd() { return this.sd != null; } + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + public int getParametersSize() { return (this.parameters == null) ? 0 : this.parameters.size(); } @@ -330,32 +472,42 @@ public class Index implements TBase, java.io.Serializable, Cloneable { this.parameters = null; } - // Returns true if field parameters is set (has been asigned a value) and false otherwise + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ public boolean isSetParameters() { return this.parameters != null; } + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + public boolean isDeferredRebuild() { return this.deferredRebuild; } public void setDeferredRebuild(boolean deferredRebuild) { this.deferredRebuild = deferredRebuild; - this.__isset.deferredRebuild = true; + setDeferredRebuildIsSet(true); } public void unsetDeferredRebuild() { - this.__isset.deferredRebuild = false; + __isset_bit_vector.clear(__DEFERREDREBUILD_ISSET_ID); } - // Returns true if field deferredRebuild is set (has been asigned a value) and false otherwise + /** Returns true if field deferredRebuild is set (has been asigned a value) and false otherwise */ public boolean isSetDeferredRebuild() { - return this.__isset.deferredRebuild; + return __isset_bit_vector.get(__DEFERREDREBUILD_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case INDEXNAME: + public void setDeferredRebuildIsSet(boolean value) { + __isset_bit_vector.set(__DEFERREDREBUILD_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case INDEX_NAME: if (value == null) { unsetIndexName(); } else { @@ -363,7 +515,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case INDEXHANDLERCLASS: + case INDEX_HANDLER_CLASS: if (value == null) { unsetIndexHandlerClass(); } else { @@ -371,7 +523,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -379,7 +531,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case ORIGTABLENAME: + case ORIG_TABLE_NAME: if (value == null) { unsetOrigTableName(); } else { @@ -387,7 +539,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -395,7 +547,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -403,7 +555,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case INDEXTABLENAME: + case INDEX_TABLE_NAME: if (value == null) { unsetIndexTableName(); } else { @@ -427,7 +579,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case DEFERREDREBUILD: + case DEFERRED_REBUILD: if (value == null) { unsetDeferredRebuild(); } else { @@ -435,32 +587,30 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case INDEXNAME: + public Object getFieldValue(_Fields field) { + switch (field) { + case INDEX_NAME: return getIndexName(); - case INDEXHANDLERCLASS: + case INDEX_HANDLER_CLASS: return getIndexHandlerClass(); - case DBNAME: + case DB_NAME: return getDbName(); - case ORIGTABLENAME: + case ORIG_TABLE_NAME: return getOrigTableName(); - case CREATETIME: + case CREATE_TIME: return new Integer(getCreateTime()); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return new Integer(getLastAccessTime()); - case INDEXTABLENAME: + case INDEX_TABLE_NAME: return getIndexTableName(); case SD: @@ -469,40 +619,42 @@ public class Index implements TBase, java.io.Serializable, Cloneable { case PARAMETERS: return getParameters(); - case DEFERREDREBUILD: + case DEFERRED_REBUILD: return new Boolean(isDeferredRebuild()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case INDEXNAME: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case INDEX_NAME: return isSetIndexName(); - case INDEXHANDLERCLASS: + case INDEX_HANDLER_CLASS: return isSetIndexHandlerClass(); - case DBNAME: + case DB_NAME: return isSetDbName(); - case ORIGTABLENAME: + case ORIG_TABLE_NAME: return isSetOrigTableName(); - case CREATETIME: + case CREATE_TIME: return isSetCreateTime(); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return isSetLastAccessTime(); - case INDEXTABLENAME: + case INDEX_TABLE_NAME: return isSetIndexTableName(); case SD: return isSetSd(); case PARAMETERS: return isSetParameters(); - case DEFERREDREBUILD: + case DEFERRED_REBUILD: return isSetDeferredRebuild(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -616,6 +768,121 @@ public class Index implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Index other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Index typedOther = (Index)other; + + lastComparison = Boolean.valueOf(isSetIndexName()).compareTo(typedOther.isSetIndexName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexName()) { + lastComparison = TBaseHelper.compareTo(this.indexName, typedOther.indexName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexHandlerClass()).compareTo(typedOther.isSetIndexHandlerClass()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexHandlerClass()) { + lastComparison = TBaseHelper.compareTo(this.indexHandlerClass, typedOther.indexHandlerClass); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrigTableName()).compareTo(typedOther.isSetOrigTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrigTableName()) { + lastComparison = TBaseHelper.compareTo(this.origTableName, typedOther.origTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndexTableName()).compareTo(typedOther.isSetIndexTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndexTableName()) { + lastComparison = TBaseHelper.compareTo(this.indexTableName, typedOther.indexTableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeferredRebuild()).compareTo(typedOther.isSetDeferredRebuild()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeferredRebuild()) { + lastComparison = TBaseHelper.compareTo(this.deferredRebuild, typedOther.deferredRebuild); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -625,60 +892,59 @@ public class Index implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case INDEXNAME: + switch (field.id) { + case 1: // INDEX_NAME if (field.type == TType.STRING) { this.indexName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case INDEXHANDLERCLASS: + case 2: // INDEX_HANDLER_CLASS if (field.type == TType.STRING) { this.indexHandlerClass = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DBNAME: + case 3: // DB_NAME if (field.type == TType.STRING) { this.dbName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case ORIGTABLENAME: + case 4: // ORIG_TABLE_NAME if (field.type == TType.STRING) { this.origTableName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case CREATETIME: + case 5: // CREATE_TIME if (field.type == TType.I32) { this.createTime = iprot.readI32(); - this.__isset.createTime = true; + setCreateTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case LASTACCESSTIME: + case 6: // LAST_ACCESS_TIME if (field.type == TType.I32) { this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case INDEXTABLENAME: + case 7: // INDEX_TABLE_NAME if (field.type == TType.STRING) { this.indexTableName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SD: + case 8: // SD if (field.type == TType.STRUCT) { this.sd = new StorageDescriptor(); this.sd.read(iprot); @@ -686,7 +952,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case PARAMETERS: + case 9: // PARAMETERS if (field.type == TType.MAP) { { TMap _map44 = iprot.readMapBegin(); @@ -705,22 +971,20 @@ public class Index implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DEFERREDREBUILD: + case 10: // DEFERRED_REBUILD if (field.type == TType.BOOL) { this.deferredRebuild = iprot.readBool(); - this.__isset.deferredRebuild = true; + setDeferredRebuildIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -768,7 +1032,8 @@ public class Index implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter48 : this.parameters.entrySet()) { + for (Map.Entry _iter48 : this.parameters.entrySet()) + { oprot.writeString(_iter48.getKey()); oprot.writeString(_iter48.getValue()); } @@ -861,7 +1126,6 @@ public class Index implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java index 2692975..392f6fe 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class IndexAlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class IndexAlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("IndexAlreadyExistsException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(IndexAlreadyExistsException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav } } - @Override - public IndexAlreadyExistsException clone() { + public IndexAlreadyExistsException deepCopy() { return new IndexAlreadyExistsException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav return 0; } + public int compareTo(IndexAlreadyExistsException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IndexAlreadyExistsException typedOther = (IndexAlreadyExistsException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java index 22fba01..6749692 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class InvalidObjectException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class InvalidObjectException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("InvalidObjectException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(InvalidObjectException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class InvalidObjectException extends Exception implements TBase, java.io. } } - @Override - public InvalidObjectException clone() { + public InvalidObjectException deepCopy() { return new InvalidObjectException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class InvalidObjectException extends Exception implements TBase, java.io. this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class InvalidObjectException extends Exception implements TBase, java.io. } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class InvalidObjectException extends Exception implements TBase, java.io. return 0; } + public int compareTo(InvalidObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InvalidObjectException typedOther = (InvalidObjectException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class InvalidObjectException extends Exception implements TBase, java.io. if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class InvalidObjectException extends Exception implements TBase, java.io. break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class InvalidObjectException extends Exception implements TBase, java.io. public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java index 94af63f..608a6be 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class InvalidOperationException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class InvalidOperationException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("InvalidOperationException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(InvalidOperationException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class InvalidOperationException extends Exception implements TBase, java. } } - @Override - public InvalidOperationException clone() { + public InvalidOperationException deepCopy() { return new InvalidOperationException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class InvalidOperationException extends Exception implements TBase, java. this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class InvalidOperationException extends Exception implements TBase, java. } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class InvalidOperationException extends Exception implements TBase, java. return 0; } + public int compareTo(InvalidOperationException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InvalidOperationException typedOther = (InvalidOperationException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class InvalidOperationException extends Exception implements TBase, java. if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class InvalidOperationException extends Exception implements TBase, java. break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class InvalidOperationException extends Exception implements TBase, java. public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java index dc93f70..4b76546 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class MetaException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class MetaException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("MetaException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(MetaException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class MetaException extends Exception implements TBase, java.io.Serializa } } - @Override - public MetaException clone() { + public MetaException deepCopy() { return new MetaException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class MetaException extends Exception implements TBase, java.io.Serializa this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class MetaException extends Exception implements TBase, java.io.Serializa } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class MetaException extends Exception implements TBase, java.io.Serializa return 0; } + public int compareTo(MetaException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + MetaException typedOther = (MetaException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class MetaException extends Exception implements TBase, java.io.Serializa if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class MetaException extends Exception implements TBase, java.io.Serializa break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class MetaException extends Exception implements TBase, java.io.Serializa public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java index 2864638..d78e762 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class NoSuchObjectException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class NoSuchObjectException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("NoSuchObjectException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(NoSuchObjectException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S } } - @Override - public NoSuchObjectException clone() { + public NoSuchObjectException deepCopy() { return new NoSuchObjectException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S return 0; } + public int compareTo(NoSuchObjectException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + NoSuchObjectException typedOther = (NoSuchObjectException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java index 3537b55..03bc8c1 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java @@ -9,38 +9,105 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Order implements TBase, java.io.Serializable, Cloneable { +public class Order implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Order"); + private static final TField COL_FIELD_DESC = new TField("col", TType.STRING, (short)1); private static final TField ORDER_FIELD_DESC = new TField("order", TType.I32, (short)2); private String col; - public static final int COL = 1; private int order; - public static final int ORDER = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean order = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + COL((short)1, "col"), + ORDER((short)2, "order"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // COL + return COL; + case 2: // ORDER + return ORDER; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(COL, new FieldMetaData("col", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); + // isset id assignments + private static final int __ORDER_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.COL, new FieldMetaData("col", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Order.class, metaDataMap); } @@ -54,25 +121,32 @@ public class Order implements TBase, java.io.Serializable, Cloneable { this(); this.col = col; this.order = order; - this.__isset.order = true; + setOrderIsSet(true); } /** * Performs a deep copy on other. */ public Order(Order other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetCol()) { this.col = other.col; } - __isset.order = other.__isset.order; this.order = other.order; } - @Override - public Order clone() { + public Order deepCopy() { return new Order(this); } + @Override + public void clear() { + this.col = null; + setOrderIsSet(false); + this.order = 0; + } + public String getCol() { return this.col; } @@ -85,31 +159,41 @@ public class Order implements TBase, java.io.Serializable, Cloneable { this.col = null; } - // Returns true if field col is set (has been asigned a value) and false otherwise + /** Returns true if field col is set (has been asigned a value) and false otherwise */ public boolean isSetCol() { return this.col != null; } + public void setColIsSet(boolean value) { + if (!value) { + this.col = null; + } + } + public int getOrder() { return this.order; } public void setOrder(int order) { this.order = order; - this.__isset.order = true; + setOrderIsSet(true); } public void unsetOrder() { - this.__isset.order = false; + __isset_bit_vector.clear(__ORDER_ISSET_ID); } - // Returns true if field order is set (has been asigned a value) and false otherwise + /** Returns true if field order is set (has been asigned a value) and false otherwise */ public boolean isSetOrder() { - return this.__isset.order; + return __isset_bit_vector.get(__ORDER_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setOrderIsSet(boolean value) { + __isset_bit_vector.set(__ORDER_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case COL: if (value == null) { unsetCol(); @@ -126,34 +210,34 @@ public class Order implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case COL: return getCol(); case ORDER: return new Integer(getOrder()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case COL: return isSetCol(); case ORDER: return isSetOrder(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -195,6 +279,41 @@ public class Order implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Order other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Order typedOther = (Order)other; + + lastComparison = Boolean.valueOf(isSetCol()).compareTo(typedOther.isSetCol()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCol()) { + lastComparison = TBaseHelper.compareTo(this.col, typedOther.col); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOrder()).compareTo(typedOther.isSetOrder()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOrder()) { + lastComparison = TBaseHelper.compareTo(this.order, typedOther.order); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -204,31 +323,28 @@ public class Order implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case COL: + switch (field.id) { + case 1: // COL if (field.type == TType.STRING) { this.col = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case ORDER: + case 2: // ORDER if (field.type == TType.I32) { this.order = iprot.readI32(); - this.__isset.order = true; + setOrderIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -270,7 +386,6 @@ public class Order implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java index ce3d7b7..30ce211 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Partition implements TBase, java.io.Serializable, Cloneable { +public class Partition implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Partition"); + private static final TField VALUES_FIELD_DESC = new TField("values", TType.LIST, (short)1); private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)2); private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)3); @@ -29,47 +38,115 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)7); private List values; - public static final int VALUES = 1; private String dbName; - public static final int DBNAME = 2; private String tableName; - public static final int TABLENAME = 3; private int createTime; - public static final int CREATETIME = 4; private int lastAccessTime; - public static final int LASTACCESSTIME = 5; private StorageDescriptor sd; - public static final int SD = 6; private Map parameters; - public static final int PARAMETERS = 7; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean createTime = false; - public boolean lastAccessTime = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + VALUES((short)1, "values"), + DB_NAME((short)2, "dbName"), + TABLE_NAME((short)3, "tableName"), + CREATE_TIME((short)4, "createTime"), + LAST_ACCESS_TIME((short)5, "lastAccessTime"), + SD((short)6, "sd"), + PARAMETERS((short)7, "parameters"); + + 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: // VALUES + return VALUES; + case 2: // DB_NAME + return DB_NAME; + case 3: // TABLE_NAME + return TABLE_NAME; + case 4: // CREATE_TIME + return CREATE_TIME; + case 5: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 6: // SD + return SD; + case 7: // PARAMETERS + return PARAMETERS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(VALUES, new FieldMetaData("values", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.VALUES, new FieldMetaData("values", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Partition.class, metaDataMap); } @@ -90,9 +167,9 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.dbName = dbName; this.tableName = tableName; this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); this.sd = sd; this.parameters = parameters; } @@ -101,6 +178,8 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { * Performs a deep copy on other. */ public Partition(Partition other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetValues()) { List __this__values = new ArrayList(); for (String other_element : other.values) { @@ -114,9 +193,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { if (other.isSetTableName()) { this.tableName = other.tableName; } - __isset.createTime = other.__isset.createTime; this.createTime = other.createTime; - __isset.lastAccessTime = other.__isset.lastAccessTime; this.lastAccessTime = other.lastAccessTime; if (other.isSetSd()) { this.sd = new StorageDescriptor(other.sd); @@ -138,11 +215,23 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Partition clone() { + public Partition deepCopy() { return new Partition(this); } + @Override + public void clear() { + this.values = null; + this.dbName = null; + this.tableName = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + this.sd = null; + this.parameters = null; + } + public int getValuesSize() { return (this.values == null) ? 0 : this.values.size(); } @@ -170,11 +259,17 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.values = null; } - // Returns true if field values is set (has been asigned a value) and false otherwise + /** Returns true if field values is set (has been asigned a value) and false otherwise */ public boolean isSetValues() { return this.values != null; } + public void setValuesIsSet(boolean value) { + if (!value) { + this.values = null; + } + } + public String getDbName() { return this.dbName; } @@ -187,11 +282,17 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.dbName = null; } - // Returns true if field dbName is set (has been asigned a value) and false otherwise + /** Returns true if field dbName is set (has been asigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + public String getTableName() { return this.tableName; } @@ -204,27 +305,37 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.tableName = null; } - // Returns true if field tableName is set (has been asigned a value) and false otherwise + /** Returns true if field tableName is set (has been asigned a value) and false otherwise */ public boolean isSetTableName() { return this.tableName != null; } + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + public int getCreateTime() { return this.createTime; } public void setCreateTime(int createTime) { this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); } public void unsetCreateTime() { - this.__isset.createTime = false; + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); } - // Returns true if field createTime is set (has been asigned a value) and false otherwise + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ public boolean isSetCreateTime() { - return this.__isset.createTime; + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -233,16 +344,20 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { public void setLastAccessTime(int lastAccessTime) { this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); } - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -257,11 +372,17 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.sd = null; } - // Returns true if field sd is set (has been asigned a value) and false otherwise + /** Returns true if field sd is set (has been asigned a value) and false otherwise */ public boolean isSetSd() { return this.sd != null; } + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + public int getParametersSize() { return (this.parameters == null) ? 0 : this.parameters.size(); } @@ -285,13 +406,19 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { this.parameters = null; } - // Returns true if field parameters is set (has been asigned a value) and false otherwise + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ public boolean isSetParameters() { return this.parameters != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case VALUES: if (value == null) { unsetValues(); @@ -300,7 +427,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -308,7 +435,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case TABLENAME: + case TABLE_NAME: if (value == null) { unsetTableName(); } else { @@ -316,7 +443,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -324,7 +451,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -348,26 +475,24 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case VALUES: return getValues(); - case DBNAME: + case DB_NAME: return getDbName(); - case TABLENAME: + case TABLE_NAME: return getTableName(); - case CREATETIME: + case CREATE_TIME: return new Integer(getCreateTime()); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return new Integer(getLastAccessTime()); case SD: @@ -376,31 +501,33 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { case PARAMETERS: return getParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case VALUES: return isSetValues(); - case DBNAME: + case DB_NAME: return isSetDbName(); - case TABLENAME: + case TABLE_NAME: return isSetTableName(); - case CREATETIME: + case CREATE_TIME: return isSetCreateTime(); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return isSetLastAccessTime(); case SD: return isSetSd(); case PARAMETERS: return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -487,6 +614,91 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Partition other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Partition typedOther = (Partition)other; + + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValues()) { + lastComparison = TBaseHelper.compareTo(this.values, typedOther.values); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -496,9 +708,8 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case VALUES: + switch (field.id) { + case 1: // VALUES if (field.type == TType.LIST) { { TList _list35 = iprot.readListBegin(); @@ -515,37 +726,37 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DBNAME: + case 2: // DB_NAME if (field.type == TType.STRING) { this.dbName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TABLENAME: + case 3: // TABLE_NAME if (field.type == TType.STRING) { this.tableName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case CREATETIME: + case 4: // CREATE_TIME if (field.type == TType.I32) { this.createTime = iprot.readI32(); - this.__isset.createTime = true; + setCreateTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case LASTACCESSTIME: + case 5: // LAST_ACCESS_TIME if (field.type == TType.I32) { this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SD: + case 6: // SD if (field.type == TType.STRUCT) { this.sd = new StorageDescriptor(); this.sd.read(iprot); @@ -553,7 +764,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case PARAMETERS: + case 7: // PARAMETERS if (field.type == TType.MAP) { { TMap _map38 = iprot.readMapBegin(); @@ -574,12 +785,10 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -591,7 +800,8 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(VALUES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.values.size())); - for (String _iter42 : this.values) { + for (String _iter42 : this.values) + { oprot.writeString(_iter42); } oprot.writeListEnd(); @@ -623,7 +833,8 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter43 : this.parameters.entrySet()) { + for (Map.Entry _iter43 : this.parameters.entrySet()) + { oprot.writeString(_iter43.getKey()); oprot.writeString(_iter43.getValue()); } @@ -693,7 +904,6 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java index 21b6439..b375ddd 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java @@ -9,40 +9,106 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Schema implements TBase, java.io.Serializable, Cloneable { +public class Schema implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Schema"); + private static final TField FIELD_SCHEMAS_FIELD_DESC = new TField("fieldSchemas", TType.LIST, (short)1); private static final TField PROPERTIES_FIELD_DESC = new TField("properties", TType.MAP, (short)2); private List fieldSchemas; - public static final int FIELDSCHEMAS = 1; private Map properties; - public static final int PROPERTIES = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + FIELD_SCHEMAS((short)1, "fieldSchemas"), + PROPERTIES((short)2, "properties"); + + 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: // FIELD_SCHEMAS + return FIELD_SCHEMAS; + case 2: // PROPERTIES + return PROPERTIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELDSCHEMAS, new FieldMetaData("fieldSchemas", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD_SCHEMAS, new FieldMetaData("fieldSchemas", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(PROPERTIES, new FieldMetaData("properties", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PROPERTIES, new FieldMetaData("properties", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Schema.class, metaDataMap); } @@ -86,11 +152,16 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Schema clone() { + public Schema deepCopy() { return new Schema(this); } + @Override + public void clear() { + this.fieldSchemas = null; + this.properties = null; + } + public int getFieldSchemasSize() { return (this.fieldSchemas == null) ? 0 : this.fieldSchemas.size(); } @@ -118,11 +189,17 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { this.fieldSchemas = null; } - // Returns true if field fieldSchemas is set (has been asigned a value) and false otherwise + /** Returns true if field fieldSchemas is set (has been asigned a value) and false otherwise */ public boolean isSetFieldSchemas() { return this.fieldSchemas != null; } + public void setFieldSchemasIsSet(boolean value) { + if (!value) { + this.fieldSchemas = null; + } + } + public int getPropertiesSize() { return (this.properties == null) ? 0 : this.properties.size(); } @@ -146,14 +223,20 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { this.properties = null; } - // Returns true if field properties is set (has been asigned a value) and false otherwise + /** Returns true if field properties is set (has been asigned a value) and false otherwise */ public boolean isSetProperties() { return this.properties != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case FIELDSCHEMAS: + public void setPropertiesIsSet(boolean value) { + if (!value) { + this.properties = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD_SCHEMAS: if (value == null) { unsetFieldSchemas(); } else { @@ -169,34 +252,34 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELDSCHEMAS: + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD_SCHEMAS: return getFieldSchemas(); case PROPERTIES: return getProperties(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELDSCHEMAS: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD_SCHEMAS: return isSetFieldSchemas(); case PROPERTIES: return isSetProperties(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -238,6 +321,41 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Schema other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Schema typedOther = (Schema)other; + + lastComparison = Boolean.valueOf(isSetFieldSchemas()).compareTo(typedOther.isSetFieldSchemas()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFieldSchemas()) { + lastComparison = TBaseHelper.compareTo(this.fieldSchemas, typedOther.fieldSchemas); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetProperties()).compareTo(typedOther.isSetProperties()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetProperties()) { + lastComparison = TBaseHelper.compareTo(this.properties, typedOther.properties); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -247,9 +365,8 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case FIELDSCHEMAS: + switch (field.id) { + case 1: // FIELD_SCHEMAS if (field.type == TType.LIST) { { TList _list49 = iprot.readListBegin(); @@ -267,7 +384,7 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case PROPERTIES: + case 2: // PROPERTIES if (field.type == TType.MAP) { { TMap _map52 = iprot.readMapBegin(); @@ -288,12 +405,10 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -305,7 +420,8 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(FIELD_SCHEMAS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.fieldSchemas.size())); - for (FieldSchema _iter56 : this.fieldSchemas) { + for (FieldSchema _iter56 : this.fieldSchemas) + { _iter56.write(oprot); } oprot.writeListEnd(); @@ -316,7 +432,8 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PROPERTIES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.properties.size())); - for (Map.Entry _iter57 : this.properties.entrySet()) { + for (Map.Entry _iter57 : this.properties.entrySet()) + { oprot.writeString(_iter57.getKey()); oprot.writeString(_iter57.getValue()); } @@ -354,7 +471,6 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java old mode 100755 new mode 100644 index e4caece..be660da --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java @@ -9,44 +9,112 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { +public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("SerDeInfo"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField SERIALIZATION_LIB_FIELD_DESC = new TField("serializationLib", TType.STRING, (short)2); private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)3); private String name; - public static final int NAME = 1; private String serializationLib; - public static final int SERIALIZATIONLIB = 2; private Map parameters; - public static final int PARAMETERS = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + SERIALIZATION_LIB((short)2, "serializationLib"), + PARAMETERS((short)3, "parameters"); + + 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: // NAME + return NAME; + case 2: // SERIALIZATION_LIB + return SERIALIZATION_LIB; + case 3: // PARAMETERS + return PARAMETERS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(SERIALIZATIONLIB, new FieldMetaData("serializationLib", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SERIALIZATION_LIB, new FieldMetaData("serializationLib", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(SerDeInfo.class, metaDataMap); } @@ -91,11 +159,17 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { } } - @Override - public SerDeInfo clone() { + public SerDeInfo deepCopy() { return new SerDeInfo(this); } + @Override + public void clear() { + this.name = null; + this.serializationLib = null; + this.parameters = null; + } + public String getName() { return this.name; } @@ -108,11 +182,17 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public String getSerializationLib() { return this.serializationLib; } @@ -125,11 +205,17 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { this.serializationLib = null; } - // Returns true if field serializationLib is set (has been asigned a value) and false otherwise + /** Returns true if field serializationLib is set (has been asigned a value) and false otherwise */ public boolean isSetSerializationLib() { return this.serializationLib != null; } + public void setSerializationLibIsSet(boolean value) { + if (!value) { + this.serializationLib = null; + } + } + public int getParametersSize() { return (this.parameters == null) ? 0 : this.parameters.size(); } @@ -153,13 +239,19 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { this.parameters = null; } - // Returns true if field parameters is set (has been asigned a value) and false otherwise + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ public boolean isSetParameters() { return this.parameters != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -168,7 +260,7 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { } break; - case SERIALIZATIONLIB: + case SERIALIZATION_LIB: if (value == null) { unsetSerializationLib(); } else { @@ -184,39 +276,39 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - case SERIALIZATIONLIB: + case SERIALIZATION_LIB: return getSerializationLib(); case PARAMETERS: return getParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - case SERIALIZATIONLIB: + case SERIALIZATION_LIB: return isSetSerializationLib(); case PARAMETERS: return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -267,6 +359,51 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(SerDeInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + SerDeInfo typedOther = (SerDeInfo)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerializationLib()).compareTo(typedOther.isSetSerializationLib()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerializationLib()) { + lastComparison = TBaseHelper.compareTo(this.serializationLib, typedOther.serializationLib); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -276,23 +413,22 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SERIALIZATIONLIB: + case 2: // SERIALIZATION_LIB if (field.type == TType.STRING) { this.serializationLib = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PARAMETERS: + case 3: // PARAMETERS if (field.type == TType.MAP) { { TMap _map4 = iprot.readMapBegin(); @@ -313,12 +449,10 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -340,7 +474,8 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter8 : this.parameters.entrySet()) { + for (Map.Entry _iter8 : this.parameters.entrySet()) + { oprot.writeString(_iter8.getKey()); oprot.writeString(_iter8.getValue()); } @@ -386,7 +521,6 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java index 10976e4..1fb3d62 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable { +public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("StorageDescriptor"); + private static final TField COLS_FIELD_DESC = new TField("cols", TType.LIST, (short)1); private static final TField LOCATION_FIELD_DESC = new TField("location", TType.STRING, (short)2); private static final TField INPUT_FORMAT_FIELD_DESC = new TField("inputFormat", TType.STRING, (short)3); @@ -32,61 +41,135 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable private static final TField PARAMETERS_FIELD_DESC = new TField("parameters", TType.MAP, (short)10); private List cols; - public static final int COLS = 1; private String location; - public static final int LOCATION = 2; private String inputFormat; - public static final int INPUTFORMAT = 3; private String outputFormat; - public static final int OUTPUTFORMAT = 4; private boolean compressed; - public static final int COMPRESSED = 5; private int numBuckets; - public static final int NUMBUCKETS = 6; private SerDeInfo serdeInfo; - public static final int SERDEINFO = 7; private List bucketCols; - public static final int BUCKETCOLS = 8; private List sortCols; - public static final int SORTCOLS = 9; private Map parameters; - public static final int PARAMETERS = 10; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean compressed = false; - public boolean numBuckets = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + COLS((short)1, "cols"), + LOCATION((short)2, "location"), + INPUT_FORMAT((short)3, "inputFormat"), + OUTPUT_FORMAT((short)4, "outputFormat"), + COMPRESSED((short)5, "compressed"), + NUM_BUCKETS((short)6, "numBuckets"), + SERDE_INFO((short)7, "serdeInfo"), + BUCKET_COLS((short)8, "bucketCols"), + SORT_COLS((short)9, "sortCols"), + PARAMETERS((short)10, "parameters"); + + 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: // COLS + return COLS; + case 2: // LOCATION + return LOCATION; + case 3: // INPUT_FORMAT + return INPUT_FORMAT; + case 4: // OUTPUT_FORMAT + return OUTPUT_FORMAT; + case 5: // COMPRESSED + return COMPRESSED; + case 6: // NUM_BUCKETS + return NUM_BUCKETS; + case 7: // SERDE_INFO + return SERDE_INFO; + case 8: // BUCKET_COLS + return BUCKET_COLS; + case 9: // SORT_COLS + return SORT_COLS; + case 10: // PARAMETERS + return PARAMETERS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(COLS, new FieldMetaData("cols", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __COMPRESSED_ISSET_ID = 0; + private static final int __NUMBUCKETS_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.COLS, new FieldMetaData("cols", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LOCATION, new FieldMetaData("location", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(INPUTFORMAT, new FieldMetaData("inputFormat", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INPUT_FORMAT, new FieldMetaData("inputFormat", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(OUTPUTFORMAT, new FieldMetaData("outputFormat", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.OUTPUT_FORMAT, new FieldMetaData("outputFormat", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(COMPRESSED, new FieldMetaData("compressed", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.COMPRESSED, new FieldMetaData("compressed", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(NUMBUCKETS, new FieldMetaData("numBuckets", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NUM_BUCKETS, new FieldMetaData("numBuckets", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(SERDEINFO, new FieldMetaData("serdeInfo", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SERDE_INFO, new FieldMetaData("serdeInfo", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, SerDeInfo.class))); - put(BUCKETCOLS, new FieldMetaData("bucketCols", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.BUCKET_COLS, new FieldMetaData("bucketCols", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(SORTCOLS, new FieldMetaData("sortCols", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SORT_COLS, new FieldMetaData("sortCols", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Order.class)))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(StorageDescriptor.class, metaDataMap); } @@ -111,9 +194,9 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.inputFormat = inputFormat; this.outputFormat = outputFormat; this.compressed = compressed; - this.__isset.compressed = true; + setCompressedIsSet(true); this.numBuckets = numBuckets; - this.__isset.numBuckets = true; + setNumBucketsIsSet(true); this.serdeInfo = serdeInfo; this.bucketCols = bucketCols; this.sortCols = sortCols; @@ -124,6 +207,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable * Performs a deep copy on other. */ public StorageDescriptor(StorageDescriptor other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetCols()) { List __this__cols = new ArrayList(); for (FieldSchema other_element : other.cols) { @@ -140,9 +225,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable if (other.isSetOutputFormat()) { this.outputFormat = other.outputFormat; } - __isset.compressed = other.__isset.compressed; this.compressed = other.compressed; - __isset.numBuckets = other.__isset.numBuckets; this.numBuckets = other.numBuckets; if (other.isSetSerdeInfo()) { this.serdeInfo = new SerDeInfo(other.serdeInfo); @@ -178,11 +261,26 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } } - @Override - public StorageDescriptor clone() { + public StorageDescriptor deepCopy() { return new StorageDescriptor(this); } + @Override + public void clear() { + this.cols = null; + this.location = null; + this.inputFormat = null; + this.outputFormat = null; + setCompressedIsSet(false); + this.compressed = false; + setNumBucketsIsSet(false); + this.numBuckets = 0; + this.serdeInfo = null; + this.bucketCols = null; + this.sortCols = null; + this.parameters = null; + } + public int getColsSize() { return (this.cols == null) ? 0 : this.cols.size(); } @@ -210,11 +308,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.cols = null; } - // Returns true if field cols is set (has been asigned a value) and false otherwise + /** Returns true if field cols is set (has been asigned a value) and false otherwise */ public boolean isSetCols() { return this.cols != null; } + public void setColsIsSet(boolean value) { + if (!value) { + this.cols = null; + } + } + public String getLocation() { return this.location; } @@ -227,11 +331,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.location = null; } - // Returns true if field location is set (has been asigned a value) and false otherwise + /** Returns true if field location is set (has been asigned a value) and false otherwise */ public boolean isSetLocation() { return this.location != null; } + public void setLocationIsSet(boolean value) { + if (!value) { + this.location = null; + } + } + public String getInputFormat() { return this.inputFormat; } @@ -244,11 +354,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.inputFormat = null; } - // Returns true if field inputFormat is set (has been asigned a value) and false otherwise + /** Returns true if field inputFormat is set (has been asigned a value) and false otherwise */ public boolean isSetInputFormat() { return this.inputFormat != null; } + public void setInputFormatIsSet(boolean value) { + if (!value) { + this.inputFormat = null; + } + } + public String getOutputFormat() { return this.outputFormat; } @@ -261,27 +377,37 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.outputFormat = null; } - // Returns true if field outputFormat is set (has been asigned a value) and false otherwise + /** Returns true if field outputFormat is set (has been asigned a value) and false otherwise */ public boolean isSetOutputFormat() { return this.outputFormat != null; } + public void setOutputFormatIsSet(boolean value) { + if (!value) { + this.outputFormat = null; + } + } + public boolean isCompressed() { return this.compressed; } public void setCompressed(boolean compressed) { this.compressed = compressed; - this.__isset.compressed = true; + setCompressedIsSet(true); } public void unsetCompressed() { - this.__isset.compressed = false; + __isset_bit_vector.clear(__COMPRESSED_ISSET_ID); } - // Returns true if field compressed is set (has been asigned a value) and false otherwise + /** Returns true if field compressed is set (has been asigned a value) and false otherwise */ public boolean isSetCompressed() { - return this.__isset.compressed; + return __isset_bit_vector.get(__COMPRESSED_ISSET_ID); + } + + public void setCompressedIsSet(boolean value) { + __isset_bit_vector.set(__COMPRESSED_ISSET_ID, value); } public int getNumBuckets() { @@ -290,16 +416,20 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable public void setNumBuckets(int numBuckets) { this.numBuckets = numBuckets; - this.__isset.numBuckets = true; + setNumBucketsIsSet(true); } public void unsetNumBuckets() { - this.__isset.numBuckets = false; + __isset_bit_vector.clear(__NUMBUCKETS_ISSET_ID); } - // Returns true if field numBuckets is set (has been asigned a value) and false otherwise + /** Returns true if field numBuckets is set (has been asigned a value) and false otherwise */ public boolean isSetNumBuckets() { - return this.__isset.numBuckets; + return __isset_bit_vector.get(__NUMBUCKETS_ISSET_ID); + } + + public void setNumBucketsIsSet(boolean value) { + __isset_bit_vector.set(__NUMBUCKETS_ISSET_ID, value); } public SerDeInfo getSerdeInfo() { @@ -314,11 +444,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.serdeInfo = null; } - // Returns true if field serdeInfo is set (has been asigned a value) and false otherwise + /** Returns true if field serdeInfo is set (has been asigned a value) and false otherwise */ public boolean isSetSerdeInfo() { return this.serdeInfo != null; } + public void setSerdeInfoIsSet(boolean value) { + if (!value) { + this.serdeInfo = null; + } + } + public int getBucketColsSize() { return (this.bucketCols == null) ? 0 : this.bucketCols.size(); } @@ -346,11 +482,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.bucketCols = null; } - // Returns true if field bucketCols is set (has been asigned a value) and false otherwise + /** Returns true if field bucketCols is set (has been asigned a value) and false otherwise */ public boolean isSetBucketCols() { return this.bucketCols != null; } + public void setBucketColsIsSet(boolean value) { + if (!value) { + this.bucketCols = null; + } + } + public int getSortColsSize() { return (this.sortCols == null) ? 0 : this.sortCols.size(); } @@ -378,11 +520,17 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.sortCols = null; } - // Returns true if field sortCols is set (has been asigned a value) and false otherwise + /** Returns true if field sortCols is set (has been asigned a value) and false otherwise */ public boolean isSetSortCols() { return this.sortCols != null; } + public void setSortColsIsSet(boolean value) { + if (!value) { + this.sortCols = null; + } + } + public int getParametersSize() { return (this.parameters == null) ? 0 : this.parameters.size(); } @@ -406,13 +554,19 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable this.parameters = null; } - // Returns true if field parameters is set (has been asigned a value) and false otherwise + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ public boolean isSetParameters() { return this.parameters != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case COLS: if (value == null) { unsetCols(); @@ -429,7 +583,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case INPUTFORMAT: + case INPUT_FORMAT: if (value == null) { unsetInputFormat(); } else { @@ -437,7 +591,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case OUTPUTFORMAT: + case OUTPUT_FORMAT: if (value == null) { unsetOutputFormat(); } else { @@ -453,7 +607,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case NUMBUCKETS: + case NUM_BUCKETS: if (value == null) { unsetNumBuckets(); } else { @@ -461,7 +615,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case SERDEINFO: + case SERDE_INFO: if (value == null) { unsetSerdeInfo(); } else { @@ -469,7 +623,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case BUCKETCOLS: + case BUCKET_COLS: if (value == null) { unsetBucketCols(); } else { @@ -477,7 +631,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case SORTCOLS: + case SORT_COLS: if (value == null) { unsetSortCols(); } else { @@ -493,74 +647,74 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case COLS: return getCols(); case LOCATION: return getLocation(); - case INPUTFORMAT: + case INPUT_FORMAT: return getInputFormat(); - case OUTPUTFORMAT: + case OUTPUT_FORMAT: return getOutputFormat(); case COMPRESSED: return new Boolean(isCompressed()); - case NUMBUCKETS: + case NUM_BUCKETS: return new Integer(getNumBuckets()); - case SERDEINFO: + case SERDE_INFO: return getSerdeInfo(); - case BUCKETCOLS: + case BUCKET_COLS: return getBucketCols(); - case SORTCOLS: + case SORT_COLS: return getSortCols(); case PARAMETERS: return getParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case COLS: return isSetCols(); case LOCATION: return isSetLocation(); - case INPUTFORMAT: + case INPUT_FORMAT: return isSetInputFormat(); - case OUTPUTFORMAT: + case OUTPUT_FORMAT: return isSetOutputFormat(); case COMPRESSED: return isSetCompressed(); - case NUMBUCKETS: + case NUM_BUCKETS: return isSetNumBuckets(); - case SERDEINFO: + case SERDE_INFO: return isSetSerdeInfo(); - case BUCKETCOLS: + case BUCKET_COLS: return isSetBucketCols(); - case SORTCOLS: + case SORT_COLS: return isSetSortCols(); case PARAMETERS: return isSetParameters(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -674,6 +828,121 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable return 0; } + public int compareTo(StorageDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + StorageDescriptor typedOther = (StorageDescriptor)other; + + lastComparison = Boolean.valueOf(isSetCols()).compareTo(typedOther.isSetCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCols()) { + lastComparison = TBaseHelper.compareTo(this.cols, typedOther.cols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLocation()).compareTo(typedOther.isSetLocation()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLocation()) { + lastComparison = TBaseHelper.compareTo(this.location, typedOther.location); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInputFormat()).compareTo(typedOther.isSetInputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInputFormat()) { + lastComparison = TBaseHelper.compareTo(this.inputFormat, typedOther.inputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOutputFormat()).compareTo(typedOther.isSetOutputFormat()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOutputFormat()) { + lastComparison = TBaseHelper.compareTo(this.outputFormat, typedOther.outputFormat); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompressed()).compareTo(typedOther.isSetCompressed()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompressed()) { + lastComparison = TBaseHelper.compareTo(this.compressed, typedOther.compressed); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumBuckets()).compareTo(typedOther.isSetNumBuckets()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumBuckets()) { + lastComparison = TBaseHelper.compareTo(this.numBuckets, typedOther.numBuckets); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSerdeInfo()).compareTo(typedOther.isSetSerdeInfo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSerdeInfo()) { + lastComparison = TBaseHelper.compareTo(this.serdeInfo, typedOther.serdeInfo); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBucketCols()).compareTo(typedOther.isSetBucketCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBucketCols()) { + lastComparison = TBaseHelper.compareTo(this.bucketCols, typedOther.bucketCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSortCols()).compareTo(typedOther.isSetSortCols()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSortCols()) { + lastComparison = TBaseHelper.compareTo(this.sortCols, typedOther.sortCols); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -683,9 +952,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable if (field.type == TType.STOP) { break; } - switch (field.id) - { - case COLS: + switch (field.id) { + case 1: // COLS if (field.type == TType.LIST) { { TList _list9 = iprot.readListBegin(); @@ -703,44 +971,44 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable TProtocolUtil.skip(iprot, field.type); } break; - case LOCATION: + case 2: // LOCATION if (field.type == TType.STRING) { this.location = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case INPUTFORMAT: + case 3: // INPUT_FORMAT if (field.type == TType.STRING) { this.inputFormat = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case OUTPUTFORMAT: + case 4: // OUTPUT_FORMAT if (field.type == TType.STRING) { this.outputFormat = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case COMPRESSED: + case 5: // COMPRESSED if (field.type == TType.BOOL) { this.compressed = iprot.readBool(); - this.__isset.compressed = true; + setCompressedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case NUMBUCKETS: + case 6: // NUM_BUCKETS if (field.type == TType.I32) { this.numBuckets = iprot.readI32(); - this.__isset.numBuckets = true; + setNumBucketsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SERDEINFO: + case 7: // SERDE_INFO if (field.type == TType.STRUCT) { this.serdeInfo = new SerDeInfo(); this.serdeInfo.read(iprot); @@ -748,7 +1016,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable TProtocolUtil.skip(iprot, field.type); } break; - case BUCKETCOLS: + case 8: // BUCKET_COLS if (field.type == TType.LIST) { { TList _list12 = iprot.readListBegin(); @@ -765,7 +1033,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable TProtocolUtil.skip(iprot, field.type); } break; - case SORTCOLS: + case 9: // SORT_COLS if (field.type == TType.LIST) { { TList _list15 = iprot.readListBegin(); @@ -783,7 +1051,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable TProtocolUtil.skip(iprot, field.type); } break; - case PARAMETERS: + case 10: // PARAMETERS if (field.type == TType.MAP) { { TMap _map18 = iprot.readMapBegin(); @@ -804,12 +1072,10 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -821,7 +1087,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable oprot.writeFieldBegin(COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.cols.size())); - for (FieldSchema _iter22 : this.cols) { + for (FieldSchema _iter22 : this.cols) + { _iter22.write(oprot); } oprot.writeListEnd(); @@ -858,7 +1125,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable oprot.writeFieldBegin(BUCKET_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.bucketCols.size())); - for (String _iter23 : this.bucketCols) { + for (String _iter23 : this.bucketCols) + { oprot.writeString(_iter23); } oprot.writeListEnd(); @@ -869,7 +1137,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable oprot.writeFieldBegin(SORT_COLS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.sortCols.size())); - for (Order _iter24 : this.sortCols) { + for (Order _iter24 : this.sortCols) + { _iter24.write(oprot); } oprot.writeListEnd(); @@ -880,7 +1149,8 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter25 : this.parameters.entrySet()) { + for (Map.Entry _iter25 : this.parameters.entrySet()) + { oprot.writeString(_iter25.getKey()); oprot.writeString(_iter25.getValue()); } @@ -974,7 +1244,6 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java index d89f0f2..a8943d5 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Table implements TBase, java.io.Serializable, Cloneable { +public class Table implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Table"); + private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)1); private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)2); private static final TField OWNER_FIELD_DESC = new TField("owner", TType.STRING, (short)3); @@ -34,68 +43,146 @@ public class Table implements TBase, java.io.Serializable, Cloneable { private static final TField TABLE_TYPE_FIELD_DESC = new TField("tableType", TType.STRING, (short)12); private String tableName; - public static final int TABLENAME = 1; private String dbName; - public static final int DBNAME = 2; private String owner; - public static final int OWNER = 3; private int createTime; - public static final int CREATETIME = 4; private int lastAccessTime; - public static final int LASTACCESSTIME = 5; private int retention; - public static final int RETENTION = 6; private StorageDescriptor sd; - public static final int SD = 7; private List partitionKeys; - public static final int PARTITIONKEYS = 8; private Map parameters; - public static final int PARAMETERS = 9; private String viewOriginalText; - public static final int VIEWORIGINALTEXT = 10; private String viewExpandedText; - public static final int VIEWEXPANDEDTEXT = 11; private String tableType; - public static final int TABLETYPE = 12; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean createTime = false; - public boolean lastAccessTime = false; - public boolean retention = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TABLE_NAME((short)1, "tableName"), + DB_NAME((short)2, "dbName"), + OWNER((short)3, "owner"), + CREATE_TIME((short)4, "createTime"), + LAST_ACCESS_TIME((short)5, "lastAccessTime"), + RETENTION((short)6, "retention"), + SD((short)7, "sd"), + PARTITION_KEYS((short)8, "partitionKeys"), + PARAMETERS((short)9, "parameters"), + VIEW_ORIGINAL_TEXT((short)10, "viewOriginalText"), + VIEW_EXPANDED_TEXT((short)11, "viewExpandedText"), + TABLE_TYPE((short)12, "tableType"); + + 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: // DB_NAME + return DB_NAME; + case 3: // OWNER + return OWNER; + case 4: // CREATE_TIME + return CREATE_TIME; + case 5: // LAST_ACCESS_TIME + return LAST_ACCESS_TIME; + case 6: // RETENTION + return RETENTION; + case 7: // SD + return SD; + case 8: // PARTITION_KEYS + return PARTITION_KEYS; + case 9: // PARAMETERS + return PARAMETERS; + case 10: // VIEW_ORIGINAL_TEXT + return VIEW_ORIGINAL_TEXT; + case 11: // VIEW_EXPANDED_TEXT + return VIEW_EXPANDED_TEXT; + case 12: // TABLE_TYPE + return TABLE_TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __CREATETIME_ISSET_ID = 0; + private static final int __LASTACCESSTIME_ISSET_ID = 1; + private static final int __RETENTION_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.OWNER, new FieldMetaData("owner", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(CREATETIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.CREATE_TIME, new FieldMetaData("createTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(LASTACCESSTIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LAST_ACCESS_TIME, new FieldMetaData("lastAccessTime", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(RETENTION, new FieldMetaData("retention", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.RETENTION, new FieldMetaData("retention", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SD, new FieldMetaData("sd", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, StorageDescriptor.class))); - put(PARTITIONKEYS, new FieldMetaData("partitionKeys", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARTITION_KEYS, new FieldMetaData("partitionKeys", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PARAMETERS, new FieldMetaData("parameters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(VIEWORIGINALTEXT, new FieldMetaData("viewOriginalText", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.VIEW_ORIGINAL_TEXT, new FieldMetaData("viewOriginalText", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(VIEWEXPANDEDTEXT, new FieldMetaData("viewExpandedText", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.VIEW_EXPANDED_TEXT, new FieldMetaData("viewExpandedText", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TABLETYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TABLE_TYPE, new FieldMetaData("tableType", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Table.class, metaDataMap); } @@ -121,11 +208,11 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.dbName = dbName; this.owner = owner; this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); this.retention = retention; - this.__isset.retention = true; + setRetentionIsSet(true); this.sd = sd; this.partitionKeys = partitionKeys; this.parameters = parameters; @@ -138,6 +225,8 @@ public class Table implements TBase, java.io.Serializable, Cloneable { * Performs a deep copy on other. */ public Table(Table other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetTableName()) { this.tableName = other.tableName; } @@ -147,11 +236,8 @@ public class Table implements TBase, java.io.Serializable, Cloneable { if (other.isSetOwner()) { this.owner = other.owner; } - __isset.createTime = other.__isset.createTime; this.createTime = other.createTime; - __isset.lastAccessTime = other.__isset.lastAccessTime; this.lastAccessTime = other.lastAccessTime; - __isset.retention = other.__isset.retention; this.retention = other.retention; if (other.isSetSd()) { this.sd = new StorageDescriptor(other.sd); @@ -189,11 +275,29 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Table clone() { + public Table deepCopy() { return new Table(this); } + @Override + public void clear() { + this.tableName = null; + this.dbName = null; + this.owner = null; + setCreateTimeIsSet(false); + this.createTime = 0; + setLastAccessTimeIsSet(false); + this.lastAccessTime = 0; + setRetentionIsSet(false); + this.retention = 0; + this.sd = null; + this.partitionKeys = null; + this.parameters = null; + this.viewOriginalText = null; + this.viewExpandedText = null; + this.tableType = null; + } + public String getTableName() { return this.tableName; } @@ -206,11 +310,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.tableName = null; } - // Returns true if field tableName is set (has been asigned a value) and false otherwise + /** Returns true if field tableName is set (has been asigned a value) and false otherwise */ public boolean isSetTableName() { return this.tableName != null; } + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + public String getDbName() { return this.dbName; } @@ -223,11 +333,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.dbName = null; } - // Returns true if field dbName is set (has been asigned a value) and false otherwise + /** Returns true if field dbName is set (has been asigned a value) and false otherwise */ public boolean isSetDbName() { return this.dbName != null; } + public void setDbNameIsSet(boolean value) { + if (!value) { + this.dbName = null; + } + } + public String getOwner() { return this.owner; } @@ -240,27 +356,37 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.owner = null; } - // Returns true if field owner is set (has been asigned a value) and false otherwise + /** Returns true if field owner is set (has been asigned a value) and false otherwise */ public boolean isSetOwner() { return this.owner != null; } + public void setOwnerIsSet(boolean value) { + if (!value) { + this.owner = null; + } + } + public int getCreateTime() { return this.createTime; } public void setCreateTime(int createTime) { this.createTime = createTime; - this.__isset.createTime = true; + setCreateTimeIsSet(true); } public void unsetCreateTime() { - this.__isset.createTime = false; + __isset_bit_vector.clear(__CREATETIME_ISSET_ID); } - // Returns true if field createTime is set (has been asigned a value) and false otherwise + /** Returns true if field createTime is set (has been asigned a value) and false otherwise */ public boolean isSetCreateTime() { - return this.__isset.createTime; + return __isset_bit_vector.get(__CREATETIME_ISSET_ID); + } + + public void setCreateTimeIsSet(boolean value) { + __isset_bit_vector.set(__CREATETIME_ISSET_ID, value); } public int getLastAccessTime() { @@ -269,16 +395,20 @@ public class Table implements TBase, java.io.Serializable, Cloneable { public void setLastAccessTime(int lastAccessTime) { this.lastAccessTime = lastAccessTime; - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } public void unsetLastAccessTime() { - this.__isset.lastAccessTime = false; + __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID); } - // Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise + /** Returns true if field lastAccessTime is set (has been asigned a value) and false otherwise */ public boolean isSetLastAccessTime() { - return this.__isset.lastAccessTime; + return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID); + } + + public void setLastAccessTimeIsSet(boolean value) { + __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value); } public int getRetention() { @@ -287,16 +417,20 @@ public class Table implements TBase, java.io.Serializable, Cloneable { public void setRetention(int retention) { this.retention = retention; - this.__isset.retention = true; + setRetentionIsSet(true); } public void unsetRetention() { - this.__isset.retention = false; + __isset_bit_vector.clear(__RETENTION_ISSET_ID); } - // Returns true if field retention is set (has been asigned a value) and false otherwise + /** Returns true if field retention is set (has been asigned a value) and false otherwise */ public boolean isSetRetention() { - return this.__isset.retention; + return __isset_bit_vector.get(__RETENTION_ISSET_ID); + } + + public void setRetentionIsSet(boolean value) { + __isset_bit_vector.set(__RETENTION_ISSET_ID, value); } public StorageDescriptor getSd() { @@ -311,11 +445,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.sd = null; } - // Returns true if field sd is set (has been asigned a value) and false otherwise + /** Returns true if field sd is set (has been asigned a value) and false otherwise */ public boolean isSetSd() { return this.sd != null; } + public void setSdIsSet(boolean value) { + if (!value) { + this.sd = null; + } + } + public int getPartitionKeysSize() { return (this.partitionKeys == null) ? 0 : this.partitionKeys.size(); } @@ -343,11 +483,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.partitionKeys = null; } - // Returns true if field partitionKeys is set (has been asigned a value) and false otherwise + /** Returns true if field partitionKeys is set (has been asigned a value) and false otherwise */ public boolean isSetPartitionKeys() { return this.partitionKeys != null; } + public void setPartitionKeysIsSet(boolean value) { + if (!value) { + this.partitionKeys = null; + } + } + public int getParametersSize() { return (this.parameters == null) ? 0 : this.parameters.size(); } @@ -371,11 +517,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.parameters = null; } - // Returns true if field parameters is set (has been asigned a value) and false otherwise + /** Returns true if field parameters is set (has been asigned a value) and false otherwise */ public boolean isSetParameters() { return this.parameters != null; } + public void setParametersIsSet(boolean value) { + if (!value) { + this.parameters = null; + } + } + public String getViewOriginalText() { return this.viewOriginalText; } @@ -388,11 +540,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.viewOriginalText = null; } - // Returns true if field viewOriginalText is set (has been asigned a value) and false otherwise + /** Returns true if field viewOriginalText is set (has been asigned a value) and false otherwise */ public boolean isSetViewOriginalText() { return this.viewOriginalText != null; } + public void setViewOriginalTextIsSet(boolean value) { + if (!value) { + this.viewOriginalText = null; + } + } + public String getViewExpandedText() { return this.viewExpandedText; } @@ -405,11 +563,17 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.viewExpandedText = null; } - // Returns true if field viewExpandedText is set (has been asigned a value) and false otherwise + /** Returns true if field viewExpandedText is set (has been asigned a value) and false otherwise */ public boolean isSetViewExpandedText() { return this.viewExpandedText != null; } + public void setViewExpandedTextIsSet(boolean value) { + if (!value) { + this.viewExpandedText = null; + } + } + public String getTableType() { return this.tableType; } @@ -422,14 +586,20 @@ public class Table implements TBase, java.io.Serializable, Cloneable { this.tableType = null; } - // Returns true if field tableType is set (has been asigned a value) and false otherwise + /** Returns true if field tableType is set (has been asigned a value) and false otherwise */ public boolean isSetTableType() { return this.tableType != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TABLENAME: + public void setTableTypeIsSet(boolean value) { + if (!value) { + this.tableType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: if (value == null) { unsetTableName(); } else { @@ -437,7 +607,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -453,7 +623,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -461,7 +631,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -485,7 +655,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case PARTITIONKEYS: + case PARTITION_KEYS: if (value == null) { unsetPartitionKeys(); } else { @@ -501,7 +671,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case VIEWORIGINALTEXT: + case VIEW_ORIGINAL_TEXT: if (value == null) { unsetViewOriginalText(); } else { @@ -509,7 +679,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case VIEWEXPANDEDTEXT: + case VIEW_EXPANDED_TEXT: if (value == null) { unsetViewExpandedText(); } else { @@ -517,7 +687,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case TABLETYPE: + case TABLE_TYPE: if (value == null) { unsetTableType(); } else { @@ -525,26 +695,24 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TABLENAME: + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: return getTableName(); - case DBNAME: + case DB_NAME: return getDbName(); case OWNER: return getOwner(); - case CREATETIME: + case CREATE_TIME: return new Integer(getCreateTime()); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return new Integer(getLastAccessTime()); case RETENTION: @@ -553,56 +721,58 @@ public class Table implements TBase, java.io.Serializable, Cloneable { case SD: return getSd(); - case PARTITIONKEYS: + case PARTITION_KEYS: return getPartitionKeys(); case PARAMETERS: return getParameters(); - case VIEWORIGINALTEXT: + case VIEW_ORIGINAL_TEXT: return getViewOriginalText(); - case VIEWEXPANDEDTEXT: + case VIEW_EXPANDED_TEXT: return getViewExpandedText(); - case TABLETYPE: + case TABLE_TYPE: return getTableType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TABLENAME: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: return isSetTableName(); - case DBNAME: + case DB_NAME: return isSetDbName(); case OWNER: return isSetOwner(); - case CREATETIME: + case CREATE_TIME: return isSetCreateTime(); - case LASTACCESSTIME: + case LAST_ACCESS_TIME: return isSetLastAccessTime(); case RETENTION: return isSetRetention(); case SD: return isSetSd(); - case PARTITIONKEYS: + case PARTITION_KEYS: return isSetPartitionKeys(); case PARAMETERS: return isSetParameters(); - case VIEWORIGINALTEXT: + case VIEW_ORIGINAL_TEXT: return isSetViewOriginalText(); - case VIEWEXPANDEDTEXT: + case VIEW_EXPANDED_TEXT: return isSetViewExpandedText(); - case TABLETYPE: + case TABLE_TYPE: return isSetTableType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -734,6 +904,141 @@ public class Table implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Table other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Table typedOther = (Table)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDbName()).compareTo(typedOther.isSetDbName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbName()) { + lastComparison = TBaseHelper.compareTo(this.dbName, typedOther.dbName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOwner()) { + lastComparison = TBaseHelper.compareTo(this.owner, typedOther.owner); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(typedOther.isSetCreateTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCreateTime()) { + lastComparison = TBaseHelper.compareTo(this.createTime, typedOther.createTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLastAccessTime()).compareTo(typedOther.isSetLastAccessTime()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLastAccessTime()) { + lastComparison = TBaseHelper.compareTo(this.lastAccessTime, typedOther.lastAccessTime); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRetention()).compareTo(typedOther.isSetRetention()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRetention()) { + lastComparison = TBaseHelper.compareTo(this.retention, typedOther.retention); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSd()).compareTo(typedOther.isSetSd()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSd()) { + lastComparison = TBaseHelper.compareTo(this.sd, typedOther.sd); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPartitionKeys()).compareTo(typedOther.isSetPartitionKeys()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPartitionKeys()) { + lastComparison = TBaseHelper.compareTo(this.partitionKeys, typedOther.partitionKeys); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetParameters()).compareTo(typedOther.isSetParameters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetParameters()) { + lastComparison = TBaseHelper.compareTo(this.parameters, typedOther.parameters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewOriginalText()).compareTo(typedOther.isSetViewOriginalText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewOriginalText()) { + lastComparison = TBaseHelper.compareTo(this.viewOriginalText, typedOther.viewOriginalText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetViewExpandedText()).compareTo(typedOther.isSetViewExpandedText()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetViewExpandedText()) { + lastComparison = TBaseHelper.compareTo(this.viewExpandedText, typedOther.viewExpandedText); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTableType()).compareTo(typedOther.isSetTableType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableType()) { + lastComparison = TBaseHelper.compareTo(this.tableType, typedOther.tableType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -743,54 +1048,53 @@ public class Table implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TABLENAME: + switch (field.id) { + case 1: // TABLE_NAME if (field.type == TType.STRING) { this.tableName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DBNAME: + case 2: // DB_NAME if (field.type == TType.STRING) { this.dbName = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case OWNER: + case 3: // OWNER if (field.type == TType.STRING) { this.owner = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case CREATETIME: + case 4: // CREATE_TIME if (field.type == TType.I32) { this.createTime = iprot.readI32(); - this.__isset.createTime = true; + setCreateTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case LASTACCESSTIME: + case 5: // LAST_ACCESS_TIME if (field.type == TType.I32) { this.lastAccessTime = iprot.readI32(); - this.__isset.lastAccessTime = true; + setLastAccessTimeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case RETENTION: + case 6: // RETENTION if (field.type == TType.I32) { this.retention = iprot.readI32(); - this.__isset.retention = true; + setRetentionIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SD: + case 7: // SD if (field.type == TType.STRUCT) { this.sd = new StorageDescriptor(); this.sd.read(iprot); @@ -798,7 +1102,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case PARTITIONKEYS: + case 8: // PARTITION_KEYS if (field.type == TType.LIST) { { TList _list26 = iprot.readListBegin(); @@ -816,7 +1120,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case PARAMETERS: + case 9: // PARAMETERS if (field.type == TType.MAP) { { TMap _map29 = iprot.readMapBegin(); @@ -835,21 +1139,21 @@ public class Table implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case VIEWORIGINALTEXT: + case 10: // VIEW_ORIGINAL_TEXT if (field.type == TType.STRING) { this.viewOriginalText = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case VIEWEXPANDEDTEXT: + case 11: // VIEW_EXPANDED_TEXT if (field.type == TType.STRING) { this.viewExpandedText = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TABLETYPE: + case 12: // TABLE_TYPE if (field.type == TType.STRING) { this.tableType = iprot.readString(); } else { @@ -858,12 +1162,10 @@ public class Table implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -904,7 +1206,8 @@ public class Table implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PARTITION_KEYS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.partitionKeys.size())); - for (FieldSchema _iter33 : this.partitionKeys) { + for (FieldSchema _iter33 : this.partitionKeys) + { _iter33.write(oprot); } oprot.writeListEnd(); @@ -915,7 +1218,8 @@ public class Table implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(PARAMETERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.parameters.size())); - for (Map.Entry _iter34 : this.parameters.entrySet()) { + for (Map.Entry _iter34 : this.parameters.entrySet()) + { oprot.writeString(_iter34.getKey()); oprot.writeString(_iter34.getValue()); } @@ -1036,7 +1340,6 @@ public class Table implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java index 743fcbf..f5465b5 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java @@ -9,13 +9,21 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; public class ThriftHiveMetastore { @@ -103,7 +111,97 @@ public class ThriftHiveMetastore { } - public static class Client extends com.facebook.fb303.FacebookService.Client implements Iface { + public interface AsyncIface extends com.facebook.fb303.FacebookService .AsyncIface { + + public void create_database(Database database, AsyncMethodCallback resultHandler) throws TException; + + public void get_database(String name, AsyncMethodCallback resultHandler) throws TException; + + public void drop_database(String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException; + + public void get_databases(String pattern, AsyncMethodCallback resultHandler) throws TException; + + public void get_all_databases(AsyncMethodCallback resultHandler) throws TException; + + public void get_type(String name, AsyncMethodCallback resultHandler) throws TException; + + public void create_type(Type type, AsyncMethodCallback resultHandler) throws TException; + + public void drop_type(String type, AsyncMethodCallback resultHandler) throws TException; + + public void get_type_all(String name, AsyncMethodCallback resultHandler) throws TException; + + public void get_fields(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException; + + public void get_schema(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException; + + public void create_table(Table tbl, AsyncMethodCallback resultHandler) throws TException; + + public void drop_table(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException; + + public void get_tables(String db_name, String pattern, AsyncMethodCallback resultHandler) throws TException; + + public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException; + + public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException; + + public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException; + + public void add_partition(Partition new_part, AsyncMethodCallback resultHandler) throws TException; + + public void append_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException; + + public void append_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException; + + public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler) throws TException; + + public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException; + + public void get_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException; + + public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException; + + public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException; + + public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException; + + public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException; + + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException; + + public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler) throws TException; + + public void alter_partition(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler) throws TException; + + public void get_config_value(String name, String defaultValue, AsyncMethodCallback resultHandler) throws TException; + + public void partition_name_to_vals(String part_name, AsyncMethodCallback resultHandler) throws TException; + + public void partition_name_to_spec(String part_name, AsyncMethodCallback resultHandler) throws TException; + + public void add_index(Index new_index, Table index_table, AsyncMethodCallback resultHandler) throws TException; + + public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException; + + public void get_index_by_name(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler) throws TException; + + public void get_indexes(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException; + + public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException; + + } + + public static class Client extends com.facebook.fb303.FacebookService.Client implements TServiceClient, Iface { + public static class Factory implements TServiceClientFactory { + public Factory() {} + public Client getClient(TProtocol prot) { + return new Client(prot); + } + public Client getClient(TProtocol iprot, TProtocol oprot) { + return new Client(iprot, oprot); + } + } + public Client(TProtocol prot) { this(prot, prot); @@ -122,9 +220,9 @@ public class ThriftHiveMetastore { public void send_create_database(Database database) throws TException { - oprot_.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, ++seqid_)); create_database_args args = new create_database_args(); - args.database = database; + args.setDatabase(database); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -138,6 +236,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "create_database failed: out of sequence response"); + } create_database_result result = new create_database_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -161,9 +262,9 @@ public class ThriftHiveMetastore { public void send_get_database(String name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, ++seqid_)); get_database_args args = new get_database_args(); - args.name = name; + args.setName(name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -177,6 +278,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_database failed: out of sequence response"); + } get_database_result result = new get_database_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -200,10 +304,10 @@ public class ThriftHiveMetastore { public void send_drop_database(String name, boolean deleteData) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, ++seqid_)); drop_database_args args = new drop_database_args(); - args.name = name; - args.deleteData = deleteData; + args.setName(name); + args.setDeleteData(deleteData); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -217,6 +321,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_database failed: out of sequence response"); + } drop_database_result result = new drop_database_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -240,9 +347,9 @@ public class ThriftHiveMetastore { public void send_get_databases(String pattern) throws TException { - oprot_.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, ++seqid_)); get_databases_args args = new get_databases_args(); - args.pattern = pattern; + args.setPattern(pattern); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -256,6 +363,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_databases failed: out of sequence response"); + } get_databases_result result = new get_databases_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -276,7 +386,7 @@ public class ThriftHiveMetastore { public void send_get_all_databases() throws TException { - oprot_.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, ++seqid_)); get_all_databases_args args = new get_all_databases_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -291,6 +401,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_all_databases failed: out of sequence response"); + } get_all_databases_result result = new get_all_databases_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -311,9 +424,9 @@ public class ThriftHiveMetastore { public void send_get_type(String name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, ++seqid_)); get_type_args args = new get_type_args(); - args.name = name; + args.setName(name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -327,6 +440,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_type failed: out of sequence response"); + } get_type_result result = new get_type_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -350,9 +466,9 @@ public class ThriftHiveMetastore { public void send_create_type(Type type) throws TException { - oprot_.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, ++seqid_)); create_type_args args = new create_type_args(); - args.type = type; + args.setType(type); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -366,6 +482,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "create_type failed: out of sequence response"); + } create_type_result result = new create_type_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -392,9 +511,9 @@ public class ThriftHiveMetastore { public void send_drop_type(String type) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, ++seqid_)); drop_type_args args = new drop_type_args(); - args.type = type; + args.setType(type); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -408,6 +527,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_type failed: out of sequence response"); + } drop_type_result result = new drop_type_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -431,9 +553,9 @@ public class ThriftHiveMetastore { public void send_get_type_all(String name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, ++seqid_)); get_type_all_args args = new get_type_all_args(); - args.name = name; + args.setName(name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -447,6 +569,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_type_all failed: out of sequence response"); + } get_type_all_result result = new get_type_all_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -467,10 +592,10 @@ public class ThriftHiveMetastore { public void send_get_fields(String db_name, String table_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, ++seqid_)); get_fields_args args = new get_fields_args(); - args.db_name = db_name; - args.table_name = table_name; + args.setDb_name(db_name); + args.setTable_name(table_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -484,6 +609,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_fields failed: out of sequence response"); + } get_fields_result result = new get_fields_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -510,10 +638,10 @@ public class ThriftHiveMetastore { public void send_get_schema(String db_name, String table_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, ++seqid_)); get_schema_args args = new get_schema_args(); - args.db_name = db_name; - args.table_name = table_name; + args.setDb_name(db_name); + args.setTable_name(table_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -527,6 +655,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_schema failed: out of sequence response"); + } get_schema_result result = new get_schema_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -553,9 +684,9 @@ public class ThriftHiveMetastore { public void send_create_table(Table tbl) throws TException { - oprot_.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, ++seqid_)); create_table_args args = new create_table_args(); - args.tbl = tbl; + args.setTbl(tbl); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -569,6 +700,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "create_table failed: out of sequence response"); + } create_table_result result = new create_table_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -595,11 +729,11 @@ public class ThriftHiveMetastore { public void send_drop_table(String dbname, String name, boolean deleteData) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, ++seqid_)); drop_table_args args = new drop_table_args(); - args.dbname = dbname; - args.name = name; - args.deleteData = deleteData; + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -613,6 +747,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_table failed: out of sequence response"); + } drop_table_result result = new drop_table_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -633,10 +770,10 @@ public class ThriftHiveMetastore { public void send_get_tables(String db_name, String pattern) throws TException { - oprot_.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, ++seqid_)); get_tables_args args = new get_tables_args(); - args.db_name = db_name; - args.pattern = pattern; + args.setDb_name(db_name); + args.setPattern(pattern); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -650,6 +787,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_tables failed: out of sequence response"); + } get_tables_result result = new get_tables_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -670,9 +810,9 @@ public class ThriftHiveMetastore { public void send_get_all_tables(String db_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, ++seqid_)); get_all_tables_args args = new get_all_tables_args(); - args.db_name = db_name; + args.setDb_name(db_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -686,6 +826,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_all_tables failed: out of sequence response"); + } get_all_tables_result result = new get_all_tables_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -706,10 +849,10 @@ public class ThriftHiveMetastore { public void send_get_table(String dbname, String tbl_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, ++seqid_)); get_table_args args = new get_table_args(); - args.dbname = dbname; - args.tbl_name = tbl_name; + args.setDbname(dbname); + args.setTbl_name(tbl_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -723,6 +866,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_table failed: out of sequence response"); + } get_table_result result = new get_table_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -746,11 +892,11 @@ public class ThriftHiveMetastore { public void send_alter_table(String dbname, String tbl_name, Table new_tbl) throws TException { - oprot_.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, ++seqid_)); alter_table_args args = new alter_table_args(); - args.dbname = dbname; - args.tbl_name = tbl_name; - args.new_tbl = new_tbl; + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -764,6 +910,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "alter_table failed: out of sequence response"); + } alter_table_result result = new alter_table_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -784,9 +933,9 @@ public class ThriftHiveMetastore { public void send_add_partition(Partition new_part) throws TException { - oprot_.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, ++seqid_)); add_partition_args args = new add_partition_args(); - args.new_part = new_part; + args.setNew_part(new_part); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -800,6 +949,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "add_partition failed: out of sequence response"); + } add_partition_result result = new add_partition_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -826,11 +978,11 @@ public class ThriftHiveMetastore { public void send_append_partition(String db_name, String tbl_name, List part_vals) throws TException { - oprot_.writeMessageBegin(new TMessage("append_partition", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("append_partition", TMessageType.CALL, ++seqid_)); append_partition_args args = new append_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -844,6 +996,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "append_partition failed: out of sequence response"); + } append_partition_result result = new append_partition_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -870,11 +1025,11 @@ public class ThriftHiveMetastore { public void send_append_partition_by_name(String db_name, String tbl_name, String part_name) throws TException { - oprot_.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.CALL, ++seqid_)); append_partition_by_name_args args = new append_partition_by_name_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_name = part_name; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -888,6 +1043,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "append_partition_by_name failed: out of sequence response"); + } append_partition_by_name_result result = new append_partition_by_name_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -914,12 +1072,12 @@ public class ThriftHiveMetastore { public void send_drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_partition", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_partition", TMessageType.CALL, ++seqid_)); drop_partition_args args = new drop_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; - args.deleteData = deleteData; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -933,6 +1091,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_partition failed: out of sequence response"); + } drop_partition_result result = new drop_partition_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -956,12 +1117,12 @@ public class ThriftHiveMetastore { public void send_drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.CALL, ++seqid_)); drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_name = part_name; - args.deleteData = deleteData; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -975,6 +1136,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_partition_by_name failed: out of sequence response"); + } drop_partition_by_name_result result = new drop_partition_by_name_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -998,11 +1162,11 @@ public class ThriftHiveMetastore { public void send_get_partition(String db_name, String tbl_name, List part_vals) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partition", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partition", TMessageType.CALL, ++seqid_)); get_partition_args args = new get_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1016,6 +1180,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition failed: out of sequence response"); + } get_partition_result result = new get_partition_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1039,11 +1206,11 @@ public class ThriftHiveMetastore { public void send_get_partition_by_name(String db_name, String tbl_name, String part_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.CALL, ++seqid_)); get_partition_by_name_args args = new get_partition_by_name_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_name = part_name; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1057,6 +1224,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition_by_name failed: out of sequence response"); + } get_partition_by_name_result result = new get_partition_by_name_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1080,11 +1250,11 @@ public class ThriftHiveMetastore { public void send_get_partitions(String db_name, String tbl_name, short max_parts) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partitions", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partitions", TMessageType.CALL, ++seqid_)); get_partitions_args args = new get_partitions_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_parts = max_parts; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1098,6 +1268,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partitions failed: out of sequence response"); + } get_partitions_result result = new get_partitions_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1121,11 +1294,11 @@ public class ThriftHiveMetastore { public void send_get_partition_names(String db_name, String tbl_name, short max_parts) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partition_names", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partition_names", TMessageType.CALL, ++seqid_)); get_partition_names_args args = new get_partition_names_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_parts = max_parts; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1139,6 +1312,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition_names failed: out of sequence response"); + } get_partition_names_result result = new get_partition_names_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1159,12 +1335,12 @@ public class ThriftHiveMetastore { public void send_get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.CALL, ++seqid_)); get_partitions_ps_args args = new get_partitions_ps_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; - args.max_parts = max_parts; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1178,6 +1354,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partitions_ps failed: out of sequence response"); + } get_partitions_ps_result result = new get_partitions_ps_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1198,12 +1377,12 @@ public class ThriftHiveMetastore { public void send_get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.CALL, ++seqid_)); get_partition_names_ps_args args = new get_partition_names_ps_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.part_vals = part_vals; - args.max_parts = max_parts; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1217,6 +1396,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partition_names_ps failed: out of sequence response"); + } get_partition_names_ps_result result = new get_partition_names_ps_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1237,12 +1419,12 @@ public class ThriftHiveMetastore { public void send_get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts) throws TException { - oprot_.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.CALL, ++seqid_)); get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.filter = filter; - args.max_parts = max_parts; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1256,6 +1438,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_partitions_by_filter failed: out of sequence response"); + } get_partitions_by_filter_result result = new get_partitions_by_filter_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1279,11 +1464,11 @@ public class ThriftHiveMetastore { public void send_alter_partition(String db_name, String tbl_name, Partition new_part) throws TException { - oprot_.writeMessageBegin(new TMessage("alter_partition", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("alter_partition", TMessageType.CALL, ++seqid_)); alter_partition_args args = new alter_partition_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.new_part = new_part; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1297,6 +1482,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "alter_partition failed: out of sequence response"); + } alter_partition_result result = new alter_partition_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1317,10 +1505,10 @@ public class ThriftHiveMetastore { public void send_get_config_value(String name, String defaultValue) throws TException { - oprot_.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, ++seqid_)); get_config_value_args args = new get_config_value_args(); - args.name = name; - args.defaultValue = defaultValue; + args.setName(name); + args.setDefaultValue(defaultValue); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1334,6 +1522,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_config_value failed: out of sequence response"); + } get_config_value_result result = new get_config_value_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1354,9 +1545,9 @@ public class ThriftHiveMetastore { public void send_partition_name_to_vals(String part_name) throws TException { - oprot_.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, ++seqid_)); partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.part_name = part_name; + args.setPart_name(part_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1370,6 +1561,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "partition_name_to_vals failed: out of sequence response"); + } partition_name_to_vals_result result = new partition_name_to_vals_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1390,9 +1584,9 @@ public class ThriftHiveMetastore { public void send_partition_name_to_spec(String part_name) throws TException { - oprot_.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, ++seqid_)); partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.part_name = part_name; + args.setPart_name(part_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1406,6 +1600,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "partition_name_to_spec failed: out of sequence response"); + } partition_name_to_spec_result result = new partition_name_to_spec_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1426,10 +1623,10 @@ public class ThriftHiveMetastore { public void send_add_index(Index new_index, Table index_table) throws TException { - oprot_.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, ++seqid_)); add_index_args args = new add_index_args(); - args.new_index = new_index; - args.index_table = index_table; + args.setNew_index(new_index); + args.setIndex_table(index_table); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1443,6 +1640,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "add_index failed: out of sequence response"); + } add_index_result result = new add_index_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1469,12 +1669,12 @@ public class ThriftHiveMetastore { public void send_drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData) throws TException { - oprot_.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.CALL, ++seqid_)); drop_index_by_name_args args = new drop_index_by_name_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.index_name = index_name; - args.deleteData = deleteData; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.setDeleteData(deleteData); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1488,6 +1688,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "drop_index_by_name failed: out of sequence response"); + } drop_index_by_name_result result = new drop_index_by_name_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1511,11 +1714,11 @@ public class ThriftHiveMetastore { public void send_get_index_by_name(String db_name, String tbl_name, String index_name) throws TException { - oprot_.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.CALL, ++seqid_)); get_index_by_name_args args = new get_index_by_name_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.index_name = index_name; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1529,6 +1732,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_index_by_name failed: out of sequence response"); + } get_index_by_name_result result = new get_index_by_name_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1552,11 +1758,11 @@ public class ThriftHiveMetastore { public void send_get_indexes(String db_name, String tbl_name, short max_indexes) throws TException { - oprot_.writeMessageBegin(new TMessage("get_indexes", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_indexes", TMessageType.CALL, ++seqid_)); get_indexes_args args = new get_indexes_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_indexes = max_indexes; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1570,6 +1776,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_indexes failed: out of sequence response"); + } get_indexes_result result = new get_indexes_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1593,11 +1802,11 @@ public class ThriftHiveMetastore { public void send_get_index_names(String db_name, String tbl_name, short max_indexes) throws TException { - oprot_.writeMessageBegin(new TMessage("get_index_names", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("get_index_names", TMessageType.CALL, ++seqid_)); get_index_names_args args = new get_index_names_args(); - args.db_name = db_name; - args.tbl_name = tbl_name; - args.max_indexes = max_indexes; + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -1611,6 +1820,9 @@ public class ThriftHiveMetastore { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "get_index_names failed: out of sequence response"); + } get_index_names_result result = new get_index_names_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -1624,187 +1836,1568 @@ public class ThriftHiveMetastore { } } - public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { - private static final Logger LOGGER = Logger.getLogger(Processor.class.getName()); - public Processor(Iface iface) - { - super(iface); - iface_ = iface; - processMap_.put("create_database", new create_database()); - processMap_.put("get_database", new get_database()); - processMap_.put("drop_database", new drop_database()); - processMap_.put("get_databases", new get_databases()); - processMap_.put("get_all_databases", new get_all_databases()); - processMap_.put("get_type", new get_type()); - processMap_.put("create_type", new create_type()); - processMap_.put("drop_type", new drop_type()); - processMap_.put("get_type_all", new get_type_all()); - processMap_.put("get_fields", new get_fields()); - processMap_.put("get_schema", new get_schema()); - processMap_.put("create_table", new create_table()); - processMap_.put("drop_table", new drop_table()); - processMap_.put("get_tables", new get_tables()); - processMap_.put("get_all_tables", new get_all_tables()); - processMap_.put("get_table", new get_table()); - processMap_.put("alter_table", new alter_table()); - processMap_.put("add_partition", new add_partition()); - processMap_.put("append_partition", new append_partition()); - processMap_.put("append_partition_by_name", new append_partition_by_name()); - processMap_.put("drop_partition", new drop_partition()); - processMap_.put("drop_partition_by_name", new drop_partition_by_name()); - processMap_.put("get_partition", new get_partition()); - processMap_.put("get_partition_by_name", new get_partition_by_name()); - processMap_.put("get_partitions", new get_partitions()); - processMap_.put("get_partition_names", new get_partition_names()); - processMap_.put("get_partitions_ps", new get_partitions_ps()); - processMap_.put("get_partition_names_ps", new get_partition_names_ps()); - processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); - processMap_.put("alter_partition", new alter_partition()); - processMap_.put("get_config_value", new get_config_value()); - processMap_.put("partition_name_to_vals", new partition_name_to_vals()); - processMap_.put("partition_name_to_spec", new partition_name_to_spec()); - processMap_.put("add_index", new add_index()); - processMap_.put("drop_index_by_name", new drop_index_by_name()); - 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()); + public static class AsyncClient extends com.facebook.fb303.FacebookService.AsyncClient implements AsyncIface { + public static class Factory implements TAsyncClientFactory { + private TAsyncClientManager clientManager; + private TProtocolFactory protocolFactory; + public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } } - private Iface iface_; + public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } - public boolean process(TProtocol iprot, TProtocol oprot) throws TException - { - TMessage msg = iprot.readMessageBegin(); - ProcessFunction fn = processMap_.get(msg.name); - if (fn == null) { - TProtocolUtil.skip(iprot, TType.STRUCT); - iprot.readMessageEnd(); - TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); - oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return true; - } - fn.process(msg.seqid, iprot, oprot); - return true; + public void create_database(Database database, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + create_database_call method_call = new create_database_call(database, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class create_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { + public static class create_database_call extends TAsyncMethodCall { + private Database database; + public create_database_call(Database database, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.database = database; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("create_database", TMessageType.CALL, 0)); create_database_args args = new create_database_args(); - args.read(iprot); - iprot.readMessageEnd(); - create_database_result result = new create_database_result(); - try { - iface_.create_database(args.database); - } catch (AlreadyExistsException o1) { - result.o1 = o1; - } catch (InvalidObjectException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing create_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database"); - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + args.setDatabase(database); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_database(); } + } + public void get_database(String name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_database_call method_call = new get_database_call(name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { + public static class get_database_call extends TAsyncMethodCall { + private String name; + public get_database_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_database", TMessageType.CALL, 0)); get_database_args args = new get_database_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_database_result result = new get_database_result(); - try { - result.success = iface_.get_database(args.name); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (MetaException o2) { - result.o2 = o2; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_database"); - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Database getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_database(); } + } + public void drop_database(String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_database_call method_call = new drop_database_call(name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class drop_database implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { + public static class drop_database_call extends TAsyncMethodCall { + private String name; + private boolean deleteData; + public drop_database_call(String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.deleteData = deleteData; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_database", TMessageType.CALL, 0)); drop_database_args args = new drop_database_args(); - args.read(iprot); - iprot.readMessageEnd(); - drop_database_result result = new drop_database_result(); - try { - iface_.drop_database(args.name, args.deleteData); - } catch (NoSuchObjectException o1) { - result.o1 = o1; - } catch (InvalidOperationException o2) { - result.o2 = o2; - } catch (MetaException o3) { - result.o3 = o3; - } catch (Throwable th) { - LOGGER.error("Internal error processing drop_database", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database"); - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + args.setName(name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, InvalidOperationException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); - result.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_database(); } + } + public void get_databases(String pattern, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_databases_call method_call = new get_databases_call(pattern, resultHandler, this, protocolFactory, transport); + manager.call(method_call); } - private class get_databases implements ProcessFunction { - public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException - { + public static class get_databases_call extends TAsyncMethodCall { + private String pattern; + public get_databases_call(String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.pattern = pattern; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_databases", TMessageType.CALL, 0)); get_databases_args args = new get_databases_args(); - args.read(iprot); - iprot.readMessageEnd(); - get_databases_result result = new get_databases_result(); - try { - result.success = iface_.get_databases(args.pattern); - } catch (MetaException o1) { - result.o1 = o1; - } catch (Throwable th) { - LOGGER.error("Internal error processing get_databases", th); - TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_databases"); - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); - x.write(oprot); - oprot.writeMessageEnd(); - oprot.getTransport().flush(); - return; + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); } - oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_databases(); + } + } + + public void get_all_databases(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_all_databases_call method_call = new get_all_databases_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_all_databases_call extends TAsyncMethodCall { + public get_all_databases_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.CALL, 0)); + get_all_databases_args args = new get_all_databases_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_databases(); + } + } + + public void get_type(String name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_type_call method_call = new get_type_call(name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_type_call extends TAsyncMethodCall { + private String name; + public get_type_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_type", TMessageType.CALL, 0)); + get_type_args args = new get_type_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Type getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_type(); + } + } + + public void create_type(Type type, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + create_type_call method_call = new create_type_call(type, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class create_type_call extends TAsyncMethodCall { + private Type type; + public create_type_call(Type type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.type = type; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("create_type", TMessageType.CALL, 0)); + create_type_args args = new create_type_args(); + args.setType(type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_create_type(); + } + } + + public void drop_type(String type, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_type_call method_call = new drop_type_call(type, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_type_call extends TAsyncMethodCall { + private String type; + public drop_type_call(String type, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.type = type; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_type", TMessageType.CALL, 0)); + drop_type_args args = new drop_type_args(); + args.setType(type); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_type(); + } + } + + public void get_type_all(String name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_type_all_call method_call = new get_type_all_call(name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_type_all_call extends TAsyncMethodCall { + private String name; + public get_type_all_call(String name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_type_all", TMessageType.CALL, 0)); + get_type_all_args args = new get_type_all_args(); + args.setName(name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_type_all(); + } + } + + public void get_fields(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_fields_call method_call = new get_fields_call(db_name, table_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_fields_call extends TAsyncMethodCall { + private String db_name; + private String table_name; + public get_fields_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_fields", TMessageType.CALL, 0)); + get_fields_args args = new get_fields_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_fields(); + } + } + + public void get_schema(String db_name, String table_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_schema_call method_call = new get_schema_call(db_name, table_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_schema_call extends TAsyncMethodCall { + private String db_name; + private String table_name; + public get_schema_call(String db_name, String table_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.table_name = table_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_schema", TMessageType.CALL, 0)); + get_schema_args args = new get_schema_args(); + args.setDb_name(db_name); + args.setTable_name(table_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, UnknownTableException, UnknownDBException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_schema(); + } + } + + public void create_table(Table tbl, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + create_table_call method_call = new create_table_call(tbl, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class create_table_call extends TAsyncMethodCall { + private Table tbl; + public create_table_call(Table tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tbl = tbl; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("create_table", TMessageType.CALL, 0)); + create_table_args args = new create_table_args(); + args.setTbl(tbl); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws AlreadyExistsException, InvalidObjectException, MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_create_table(); + } + } + + public void drop_table(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_table_call method_call = new drop_table_call(dbname, name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_table_call extends TAsyncMethodCall { + private String dbname; + private String name; + private boolean deleteData; + public drop_table_call(String dbname, String name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.name = name; + this.deleteData = deleteData; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_table", TMessageType.CALL, 0)); + drop_table_args args = new drop_table_args(); + args.setDbname(dbname); + args.setName(name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_drop_table(); + } + } + + public void get_tables(String db_name, String pattern, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_tables_call method_call = new get_tables_call(db_name, pattern, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_tables_call extends TAsyncMethodCall { + private String db_name; + private String pattern; + public get_tables_call(String db_name, String pattern, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.pattern = pattern; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_tables", TMessageType.CALL, 0)); + get_tables_args args = new get_tables_args(); + args.setDb_name(db_name); + args.setPattern(pattern); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_tables(); + } + } + + public void get_all_tables(String db_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_all_tables_call method_call = new get_all_tables_call(db_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_all_tables_call extends TAsyncMethodCall { + private String db_name; + public get_all_tables_call(String db_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.CALL, 0)); + get_all_tables_args args = new get_all_tables_args(); + args.setDb_name(db_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_all_tables(); + } + } + + public void get_table(String dbname, String tbl_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_table_call method_call = new get_table_call(dbname, tbl_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_table_call extends TAsyncMethodCall { + private String dbname; + private String tbl_name; + public get_table_call(String dbname, String tbl_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_table", TMessageType.CALL, 0)); + get_table_args args = new get_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Table getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_table(); + } + } + + public void alter_table(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_table_call method_call = new alter_table_call(dbname, tbl_name, new_tbl, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class alter_table_call extends TAsyncMethodCall { + private String dbname; + private String tbl_name; + private Table new_tbl; + public alter_table_call(String dbname, String tbl_name, Table new_tbl, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.dbname = dbname; + this.tbl_name = tbl_name; + this.new_tbl = new_tbl; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_table", TMessageType.CALL, 0)); + alter_table_args args = new alter_table_args(); + args.setDbname(dbname); + args.setTbl_name(tbl_name); + args.setNew_tbl(new_tbl); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_table(); + } + } + + public void add_partition(Partition new_part, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + add_partition_call method_call = new add_partition_call(new_part, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class add_partition_call extends TAsyncMethodCall { + private Partition new_part; + public add_partition_call(Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_part = new_part; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("add_partition", TMessageType.CALL, 0)); + add_partition_args args = new add_partition_args(); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_partition(); + } + } + + public void append_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + append_partition_call method_call = new append_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class append_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + public append_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("append_partition", TMessageType.CALL, 0)); + append_partition_args args = new append_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition(); + } + } + + public void append_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + append_partition_by_name_call method_call = new append_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class append_partition_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + public append_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.CALL, 0)); + append_partition_by_name_args args = new append_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_append_partition_by_name(); + } + } + + public void drop_partition(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_partition_call method_call = new drop_partition_call(db_name, tbl_name, part_vals, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private boolean deleteData; + public drop_partition_call(String db_name, String tbl_name, List part_vals, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.deleteData = deleteData; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_partition", TMessageType.CALL, 0)); + drop_partition_args args = new drop_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition(); + } + } + + public void drop_partition_by_name(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_partition_by_name_call method_call = new drop_partition_by_name_call(db_name, tbl_name, part_name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_partition_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + private boolean deleteData; + public drop_partition_by_name_call(String db_name, String tbl_name, String part_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + this.deleteData = deleteData; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.CALL, 0)); + drop_partition_by_name_args args = new drop_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_partition_by_name(); + } + } + + public void get_partition(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_call method_call = new get_partition_call(db_name, tbl_name, part_vals, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + public get_partition_call(String db_name, String tbl_name, List part_vals, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition", TMessageType.CALL, 0)); + get_partition_args args = new get_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition(); + } + } + + public void get_partition_by_name(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_by_name_call method_call = new get_partition_by_name_call(db_name, tbl_name, part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partition_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String part_name; + public get_partition_by_name_call(String db_name, String tbl_name, String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.CALL, 0)); + get_partition_by_name_args args = new get_partition_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Partition getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_by_name(); + } + } + + public void get_partitions(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_call method_call = new get_partitions_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partitions_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partitions_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions", TMessageType.CALL, 0)); + get_partitions_args args = new get_partitions_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions(); + } + } + + public void get_partition_names(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_names_call method_call = new get_partition_names_call(db_name, tbl_name, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partition_names_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_parts; + public get_partition_names_call(String db_name, String tbl_name, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.CALL, 0)); + get_partition_names_args args = new get_partition_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names(); + } + } + + public void get_partitions_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_ps_call method_call = new get_partitions_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partitions_ps_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partitions_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.CALL, 0)); + get_partitions_ps_args args = new get_partitions_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_ps(); + } + } + + public void get_partition_names_ps(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partition_names_ps_call method_call = new get_partition_names_ps_call(db_name, tbl_name, part_vals, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partition_names_ps_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private List part_vals; + private short max_parts; + public get_partition_names_ps_call(String db_name, String tbl_name, List part_vals, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.part_vals = part_vals; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.CALL, 0)); + get_partition_names_ps_args args = new get_partition_names_ps_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setPart_vals(part_vals); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partition_names_ps(); + } + } + + public void get_partitions_by_filter(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_partitions_by_filter_call method_call = new get_partitions_by_filter_call(db_name, tbl_name, filter, max_parts, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_partitions_by_filter_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String filter; + private short max_parts; + public get_partitions_by_filter_call(String db_name, String tbl_name, String filter, short max_parts, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.filter = filter; + this.max_parts = max_parts; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.CALL, 0)); + get_partitions_by_filter_args args = new get_partitions_by_filter_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setFilter(filter); + args.setMax_parts(max_parts); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_partitions_by_filter(); + } + } + + public void alter_partition(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + alter_partition_call method_call = new alter_partition_call(db_name, tbl_name, new_part, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class alter_partition_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private Partition new_part; + public alter_partition_call(String db_name, String tbl_name, Partition new_part, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.new_part = new_part; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("alter_partition", TMessageType.CALL, 0)); + alter_partition_args args = new alter_partition_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setNew_part(new_part); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws InvalidOperationException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_alter_partition(); + } + } + + public void get_config_value(String name, String defaultValue, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_config_value_call method_call = new get_config_value_call(name, defaultValue, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_config_value_call extends TAsyncMethodCall { + private String name; + private String defaultValue; + public get_config_value_call(String name, String defaultValue, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.name = name; + this.defaultValue = defaultValue; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_config_value", TMessageType.CALL, 0)); + get_config_value_args args = new get_config_value_args(); + args.setName(name); + args.setDefaultValue(defaultValue); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws ConfigValSecurityException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_config_value(); + } + } + + public void partition_name_to_vals(String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + partition_name_to_vals_call method_call = new partition_name_to_vals_call(part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class partition_name_to_vals_call extends TAsyncMethodCall { + private String part_name; + public partition_name_to_vals_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.CALL, 0)); + partition_name_to_vals_args args = new partition_name_to_vals_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_vals(); + } + } + + public void partition_name_to_spec(String part_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + partition_name_to_spec_call method_call = new partition_name_to_spec_call(part_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class partition_name_to_spec_call extends TAsyncMethodCall { + private String part_name; + public partition_name_to_spec_call(String part_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.part_name = part_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.CALL, 0)); + partition_name_to_spec_args args = new partition_name_to_spec_args(); + args.setPart_name(part_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_partition_name_to_spec(); + } + } + + public void add_index(Index new_index, Table index_table, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + add_index_call method_call = new add_index_call(new_index, index_table, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class add_index_call extends TAsyncMethodCall { + private Index new_index; + private Table index_table; + public add_index_call(Index new_index, Table index_table, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.new_index = new_index; + this.index_table = index_table; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("add_index", TMessageType.CALL, 0)); + add_index_args args = new add_index_args(); + args.setNew_index(new_index); + args.setIndex_table(index_table); + args.write(prot); + prot.writeMessageEnd(); + } + + public Index getResult() throws InvalidObjectException, AlreadyExistsException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_add_index(); + } + } + + public void drop_index_by_name(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + drop_index_by_name_call method_call = new drop_index_by_name_call(db_name, tbl_name, index_name, deleteData, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class drop_index_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + private boolean deleteData; + public drop_index_by_name_call(String db_name, String tbl_name, String index_name, boolean deleteData, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + this.deleteData = deleteData; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.CALL, 0)); + drop_index_by_name_args args = new drop_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.setDeleteData(deleteData); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_drop_index_by_name(); + } + } + + public void get_index_by_name(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_index_by_name_call method_call = new get_index_by_name_call(db_name, tbl_name, index_name, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_index_by_name_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private String index_name; + public get_index_by_name_call(String db_name, String tbl_name, String index_name, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.index_name = index_name; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.CALL, 0)); + get_index_by_name_args args = new get_index_by_name_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setIndex_name(index_name); + args.write(prot); + prot.writeMessageEnd(); + } + + public Index getResult() throws MetaException, NoSuchObjectException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_by_name(); + } + } + + public void get_indexes(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_indexes_call method_call = new get_indexes_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_indexes_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_indexes_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_indexes", TMessageType.CALL, 0)); + get_indexes_args args = new get_indexes_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws NoSuchObjectException, MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_indexes(); + } + } + + public void get_index_names(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + get_index_names_call method_call = new get_index_names_call(db_name, tbl_name, max_indexes, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class get_index_names_call extends TAsyncMethodCall { + private String db_name; + private String tbl_name; + private short max_indexes; + public get_index_names_call(String db_name, String tbl_name, short max_indexes, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.db_name = db_name; + this.tbl_name = tbl_name; + this.max_indexes = max_indexes; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("get_index_names", TMessageType.CALL, 0)); + get_index_names_args args = new get_index_names_args(); + args.setDb_name(db_name); + args.setTbl_name(tbl_name); + args.setMax_indexes(max_indexes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws MetaException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get_index_names(); + } + } + + } + + public static class Processor extends com.facebook.fb303.FacebookService.Processor implements TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(Iface iface) + { + super(iface); + iface_ = iface; + processMap_.put("create_database", new create_database()); + processMap_.put("get_database", new get_database()); + processMap_.put("drop_database", new drop_database()); + processMap_.put("get_databases", new get_databases()); + processMap_.put("get_all_databases", new get_all_databases()); + processMap_.put("get_type", new get_type()); + processMap_.put("create_type", new create_type()); + processMap_.put("drop_type", new drop_type()); + processMap_.put("get_type_all", new get_type_all()); + processMap_.put("get_fields", new get_fields()); + processMap_.put("get_schema", new get_schema()); + processMap_.put("create_table", new create_table()); + processMap_.put("drop_table", new drop_table()); + processMap_.put("get_tables", new get_tables()); + processMap_.put("get_all_tables", new get_all_tables()); + processMap_.put("get_table", new get_table()); + processMap_.put("alter_table", new alter_table()); + processMap_.put("add_partition", new add_partition()); + processMap_.put("append_partition", new append_partition()); + processMap_.put("append_partition_by_name", new append_partition_by_name()); + processMap_.put("drop_partition", new drop_partition()); + processMap_.put("drop_partition_by_name", new drop_partition_by_name()); + processMap_.put("get_partition", new get_partition()); + processMap_.put("get_partition_by_name", new get_partition_by_name()); + processMap_.put("get_partitions", new get_partitions()); + processMap_.put("get_partition_names", new get_partition_names()); + processMap_.put("get_partitions_ps", new get_partitions_ps()); + processMap_.put("get_partition_names_ps", new get_partition_names_ps()); + processMap_.put("get_partitions_by_filter", new get_partitions_by_filter()); + processMap_.put("alter_partition", new alter_partition()); + processMap_.put("get_config_value", new get_config_value()); + processMap_.put("partition_name_to_vals", new partition_name_to_vals()); + processMap_.put("partition_name_to_spec", new partition_name_to_spec()); + processMap_.put("add_index", new add_index()); + processMap_.put("drop_index_by_name", new drop_index_by_name()); + 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()); + } + + private Iface iface_; + + public boolean process(TProtocol iprot, TProtocol oprot) throws TException + { + TMessage msg = iprot.readMessageBegin(); + ProcessFunction fn = processMap_.get(msg.name); + if (fn == null) { + TProtocolUtil.skip(iprot, TType.STRUCT); + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'"); + oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return true; + } + fn.process(msg.seqid, iprot, oprot); + return true; + } + + private class create_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + create_database_args args = new create_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + create_database_result result = new create_database_result(); + try { + iface_.create_database(args.database); + } catch (AlreadyExistsException o1) { + result.o1 = o1; + } catch (InvalidObjectException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing create_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing create_database"); + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("create_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_database_args args = new get_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_database_result result = new get_database_result(); + try { + result.success = iface_.get_database(args.name); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (MetaException o2) { + result.o2 = o2; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_database"); + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class drop_database implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + drop_database_args args = new drop_database_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + drop_database_result result = new drop_database_result(); + try { + iface_.drop_database(args.name, args.deleteData); + } catch (NoSuchObjectException o1) { + result.o1 = o1; + } catch (InvalidOperationException o2) { + result.o2 = o2; + } catch (MetaException o3) { + result.o3 = o3; + } catch (Throwable th) { + LOGGER.error("Internal error processing drop_database", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing drop_database"); + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("drop_database", TMessageType.REPLY, seqid)); + result.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + } + + } + + private class get_databases implements ProcessFunction { + public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException + { + get_databases_args args = new get_databases_args(); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + iprot.readMessageEnd(); + get_databases_result result = new get_databases_result(); + try { + result.success = iface_.get_databases(args.pattern); + } catch (MetaException o1) { + result.o1 = o1; + } catch (Throwable th) { + LOGGER.error("Internal error processing get_databases", th); + TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing get_databases"); + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } + oprot.writeMessageBegin(new TMessage("get_databases", TMessageType.REPLY, seqid)); result.write(oprot); oprot.writeMessageEnd(); oprot.getTransport().flush(); @@ -1816,7 +3409,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_all_databases_args args = new get_all_databases_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_all_databases", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_all_databases_result result = new get_all_databases_result(); try { @@ -1844,7 +3447,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_type_args args = new get_type_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_type_result result = new get_type_result(); try { @@ -1874,12 +3487,22 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { create_type_args args = new create_type_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); create_type_result result = new create_type_result(); try { result.success = iface_.create_type(args.type); - result.__isset.success = true; + result.setSuccessIsSet(true); } catch (AlreadyExistsException o1) { result.o1 = o1; } catch (InvalidObjectException o2) { @@ -1907,12 +3530,22 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { drop_type_args args = new drop_type_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_type", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); drop_type_result result = new drop_type_result(); try { result.success = iface_.drop_type(args.type); - result.__isset.success = true; + result.setSuccessIsSet(true); } catch (MetaException o1) { result.o1 = o1; } catch (NoSuchObjectException o2) { @@ -1938,7 +3571,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_type_all_args args = new get_type_all_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_type_all", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_type_all_result result = new get_type_all_result(); try { @@ -1966,7 +3609,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_fields_args args = new get_fields_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_fields", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_fields_result result = new get_fields_result(); try { @@ -1998,7 +3651,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_schema_args args = new get_schema_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_schema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_schema_result result = new get_schema_result(); try { @@ -2030,7 +3693,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { create_table_args args = new create_table_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("create_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); create_table_result result = new create_table_result(); try { @@ -2064,7 +3737,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { drop_table_args args = new drop_table_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); drop_table_result result = new drop_table_result(); try { @@ -2094,7 +3777,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_tables_args args = new get_tables_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_tables_result result = new get_tables_result(); try { @@ -2122,7 +3815,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_all_tables_args args = new get_all_tables_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_all_tables", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_all_tables_result result = new get_all_tables_result(); try { @@ -2150,7 +3853,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_table_args args = new get_table_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_table_result result = new get_table_result(); try { @@ -2180,7 +3893,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { alter_table_args args = new alter_table_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_table", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); alter_table_result result = new alter_table_result(); try { @@ -2210,7 +3933,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { add_partition_args args = new add_partition_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("add_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); add_partition_result result = new add_partition_result(); try { @@ -2242,7 +3975,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { append_partition_args args = new append_partition_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("append_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); append_partition_result result = new append_partition_result(); try { @@ -2274,7 +4017,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { append_partition_by_name_args args = new append_partition_by_name_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("append_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); append_partition_by_name_result result = new append_partition_by_name_result(); try { @@ -2306,12 +4059,22 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { drop_partition_args args = new drop_partition_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); drop_partition_result result = new drop_partition_result(); try { result.success = iface_.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData); - result.__isset.success = true; + result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { @@ -2337,12 +4100,22 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { drop_partition_by_name_args args = new drop_partition_by_name_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); drop_partition_by_name_result result = new drop_partition_by_name_result(); try { result.success = iface_.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData); - result.__isset.success = true; + result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { @@ -2368,7 +4141,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partition_args args = new get_partition_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partition_result result = new get_partition_result(); try { @@ -2398,7 +4181,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partition_by_name_args args = new get_partition_by_name_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partition_by_name_result result = new get_partition_by_name_result(); try { @@ -2428,7 +4221,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partitions_args args = new get_partitions_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partitions_result result = new get_partitions_result(); try { @@ -2458,7 +4261,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partition_names_args args = new get_partition_names_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partition_names_result result = new get_partition_names_result(); try { @@ -2486,7 +4299,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partitions_ps_args args = new get_partitions_ps_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partitions_ps_result result = new get_partitions_ps_result(); try { @@ -2514,7 +4337,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partition_names_ps_args args = new get_partition_names_ps_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partition_names_ps", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partition_names_ps_result result = new get_partition_names_ps_result(); try { @@ -2542,7 +4375,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_partitions_by_filter_args args = new get_partitions_by_filter_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_partitions_by_filter", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_partitions_by_filter_result result = new get_partitions_by_filter_result(); try { @@ -2572,7 +4415,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { alter_partition_args args = new alter_partition_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("alter_partition", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); alter_partition_result result = new alter_partition_result(); try { @@ -2602,7 +4455,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_config_value_args args = new get_config_value_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_config_value", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_config_value_result result = new get_config_value_result(); try { @@ -2630,7 +4493,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { partition_name_to_vals_args args = new partition_name_to_vals_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("partition_name_to_vals", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); partition_name_to_vals_result result = new partition_name_to_vals_result(); try { @@ -2658,7 +4531,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { partition_name_to_spec_args args = new partition_name_to_spec_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("partition_name_to_spec", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); partition_name_to_spec_result result = new partition_name_to_spec_result(); try { @@ -2686,7 +4569,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { add_index_args args = new add_index_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("add_index", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); add_index_result result = new add_index_result(); try { @@ -2718,12 +4611,22 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { drop_index_by_name_args args = new drop_index_by_name_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("drop_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); drop_index_by_name_result result = new drop_index_by_name_result(); try { result.success = iface_.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData); - result.__isset.success = true; + result.setSuccessIsSet(true); } catch (NoSuchObjectException o1) { result.o1 = o1; } catch (MetaException o2) { @@ -2749,7 +4652,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_index_by_name_args args = new get_index_by_name_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_index_by_name", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_index_by_name_result result = new get_index_by_name_result(); try { @@ -2779,7 +4692,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_indexes_args args = new get_indexes_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_indexes", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_indexes_result result = new get_indexes_result(); try { @@ -2809,7 +4732,17 @@ public class ThriftHiveMetastore { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { get_index_names_args args = new get_index_names_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("get_index_names", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); get_index_names_result result = new get_index_names_result(); try { @@ -2835,23 +4768,79 @@ public class ThriftHiveMetastore { } - public static class create_database_args implements TBase, java.io.Serializable, Cloneable { + public static class create_database_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_database_args"); + private static final TField DATABASE_FIELD_DESC = new TField("database", TType.STRUCT, (short)1); private Database database; - public static final int DATABASE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DATABASE((short)1, "database"); + + 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: // DATABASE + return DATABASE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Database.class))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DATABASE, new FieldMetaData("database", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Database.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_database_args.class, metaDataMap); } @@ -2874,11 +4863,15 @@ public class ThriftHiveMetastore { } } - @Override - public create_database_args clone() { + public create_database_args deepCopy() { return new create_database_args(this); } + @Override + public void clear() { + this.database = null; + } + public Database getDatabase() { return this.database; } @@ -2891,13 +4884,19 @@ public class ThriftHiveMetastore { this.database = null; } - // Returns true if field database is set (has been asigned a value) and false otherwise + /** Returns true if field database is set (has been asigned a value) and false otherwise */ public boolean isSetDatabase() { return this.database != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setDatabaseIsSet(boolean value) { + if (!value) { + this.database = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DATABASE: if (value == null) { unsetDatabase(); @@ -2906,29 +4905,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DATABASE: return getDatabase(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case DATABASE: return isSetDatabase(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -2961,6 +4960,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_args typedOther = (create_database_args)other; + + lastComparison = Boolean.valueOf(isSetDatabase()).compareTo(typedOther.isSetDatabase()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDatabase()) { + lastComparison = TBaseHelper.compareTo(this.database, typedOther.database); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2970,9 +4994,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DATABASE: + switch (field.id) { + case 1: // DATABASE if (field.type == TType.STRUCT) { this.database = new Database(); this.database.read(iprot); @@ -2982,12 +5005,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3022,38 +5043,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class create_database_result implements TBase, java.io.Serializable, Cloneable { + public static class create_database_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_database_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private AlreadyExistsException o1; - public static final int O1 = 1; private InvalidObjectException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_database_result.class, metaDataMap); } @@ -3086,11 +5166,17 @@ public class ThriftHiveMetastore { } } - @Override - public create_database_result clone() { + public create_database_result deepCopy() { return new create_database_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public AlreadyExistsException getO1() { return this.o1; } @@ -3103,11 +5189,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -3120,11 +5212,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -3137,13 +5235,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -3168,13 +5272,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -3184,23 +5286,25 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -3251,6 +5355,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_database_result typedOther = (create_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3260,9 +5409,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); @@ -3270,7 +5418,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); @@ -3278,7 +5426,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -3288,12 +5436,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3351,28 +5497,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } - } + } + + public static class get_database_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_database_args"); + + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + + private String name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "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: // NAME + return 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); + } - public static class get_database_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_database_args"); - private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); + private final short _thriftId; + private final String _fieldName; - private String name; - public static final int NAME = 1; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_database_args.class, metaDataMap); } @@ -3395,11 +5596,15 @@ public class ThriftHiveMetastore { } } - @Override - public get_database_args clone() { + public get_database_args deepCopy() { return new get_database_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -3412,13 +5617,19 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -3427,29 +5638,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -3482,6 +5693,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_args typedOther = (get_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3491,9 +5727,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { @@ -3502,12 +5737,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3542,38 +5775,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_database_result implements TBase, java.io.Serializable, Cloneable { + public static class get_database_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_database_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Database success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Database.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_database_result.class, metaDataMap); } @@ -3606,11 +5898,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_database_result clone() { + public get_database_result deepCopy() { return new get_database_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + public Database getSuccess() { return this.success; } @@ -3623,11 +5921,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -3640,11 +5944,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -3657,13 +5967,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -3688,13 +6004,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -3704,23 +6018,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -3771,6 +6087,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_database_result typedOther = (get_database_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3780,9 +6141,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Database(); this.success.read(iprot); @@ -3790,7 +6150,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -3798,7 +6158,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -3808,12 +6168,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3871,34 +6229,92 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_database_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_database_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_database_args"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)2); private String name; - public static final int NAME = 1; private boolean deleteData; - public static final int DELETEDATA = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + DELETE_DATA((short)2, "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: // NAME + return NAME; + case 2: // 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - }}); + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_database_args.class, metaDataMap); } @@ -3912,25 +6328,32 @@ public class ThriftHiveMetastore { this(); this.name = name; this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_database_args(drop_database_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetName()) { this.name = other.name; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override - public drop_database_args clone() { + public drop_database_args deepCopy() { return new drop_database_args(this); } + @Override + public void clear() { + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + public String getName() { return this.name; } @@ -3943,31 +6366,41 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } public void unsetDeleteData() { - this.__isset.deleteData = false; + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ public boolean isSetDeleteData() { - return this.__isset.deleteData; + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -3976,7 +6409,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -3984,34 +6417,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - case DELETEDATA: + case DELETE_DATA: return new Boolean(isDeleteData()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - case DELETEDATA: + case DELETE_DATA: return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -4053,6 +6486,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_database_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_args typedOther = (drop_database_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4062,31 +6530,28 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: + case 2: // DELETE_DATA if (field.type == TType.BOOL) { this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4128,38 +6593,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_database_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_database_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_database_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private NoSuchObjectException o1; - public static final int O1 = 1; private InvalidOperationException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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: // O1 + return O1; + case 2: // O2 + return O2; + case 3: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_database_result.class, metaDataMap); } @@ -4192,11 +6716,17 @@ public class ThriftHiveMetastore { } } - @Override - public drop_database_result clone() { + public drop_database_result deepCopy() { return new drop_database_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public NoSuchObjectException getO1() { return this.o1; } @@ -4209,11 +6739,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public InvalidOperationException getO2() { return this.o2; } @@ -4226,11 +6762,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -4243,13 +6785,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -4274,13 +6822,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -4290,23 +6836,25 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -4357,6 +6905,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_database_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_database_result typedOther = (drop_database_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4366,9 +6959,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -4376,7 +6968,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new InvalidOperationException(); this.o2.read(iprot); @@ -4384,7 +6976,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -4394,12 +6986,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4457,28 +7047,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_databases_args implements TBase, java.io.Serializable, Cloneable { + public static class get_databases_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_databases_args"); + private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)1); private String pattern; - public static final int PATTERN = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PATTERN((short)1, "pattern"); + + 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: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_databases_args.class, metaDataMap); } @@ -4501,11 +7146,15 @@ public class ThriftHiveMetastore { } } - @Override - public get_databases_args clone() { + public get_databases_args deepCopy() { return new get_databases_args(this); } + @Override + public void clear() { + this.pattern = null; + } + public String getPattern() { return this.pattern; } @@ -4518,13 +7167,19 @@ public class ThriftHiveMetastore { this.pattern = null; } - // Returns true if field pattern is set (has been asigned a value) and false otherwise + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ public boolean isSetPattern() { return this.pattern != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case PATTERN: if (value == null) { unsetPattern(); @@ -4533,29 +7188,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case PATTERN: return getPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case PATTERN: return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -4588,6 +7243,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_args typedOther = (get_databases_args)other; + + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4597,9 +7277,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case PATTERN: + switch (field.id) { + case 1: // PATTERN if (field.type == TType.STRING) { this.pattern = iprot.readString(); } else { @@ -4608,12 +7287,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4648,34 +7325,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_databases_result implements TBase, java.io.Serializable, Cloneable { + public static class get_databases_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_databases_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_databases_result.class, metaDataMap); } @@ -4707,11 +7441,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_databases_result clone() { + public get_databases_result deepCopy() { return new get_databases_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -4739,11 +7478,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -4756,13 +7501,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -4779,34 +7530,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -4848,6 +7599,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_databases_result typedOther = (get_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4857,9 +7643,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list58 = iprot.readListBegin(); @@ -4876,7 +7661,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -4886,12 +7671,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4902,7 +7685,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter61 : this.success) { + for (String _iter61 : this.success) + { oprot.writeString(_iter61); } oprot.writeListEnd(); @@ -4943,18 +7727,74 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable { + public static class get_all_databases_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_all_databases_args.class, metaDataMap); } @@ -4967,31 +7807,34 @@ public class ThriftHiveMetastore { public get_all_databases_args(get_all_databases_args other) { } - @Override - public get_all_databases_args clone() { + public get_all_databases_args deepCopy() { return new get_all_databases_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { } + throw new IllegalStateException(); } @Override @@ -5015,6 +7858,21 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_all_databases_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_args typedOther = (get_all_databases_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5024,16 +7882,13 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5056,34 +7911,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable { + public static class get_all_databases_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_all_databases_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_all_databases_result.class, metaDataMap); } @@ -5115,11 +8027,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_all_databases_result clone() { + public get_all_databases_result deepCopy() { return new get_all_databases_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -5147,11 +8064,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -5164,13 +8087,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -5187,34 +8116,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -5256,6 +8185,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_all_databases_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_databases_result typedOther = (get_all_databases_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5265,9 +8229,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list62 = iprot.readListBegin(); @@ -5284,7 +8247,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -5294,12 +8257,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5310,7 +8271,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter65 : this.success) { + for (String _iter65 : this.success) + { oprot.writeString(_iter65); } oprot.writeListEnd(); @@ -5351,28 +8313,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_type_args implements TBase, java.io.Serializable, Cloneable { + public static class get_type_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_type_args"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private String name; - public static final int NAME = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "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: // NAME + return 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_type_args.class, metaDataMap); } @@ -5395,11 +8412,15 @@ public class ThriftHiveMetastore { } } - @Override - public get_type_args clone() { + public get_type_args deepCopy() { return new get_type_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -5412,13 +8433,19 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -5427,29 +8454,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -5482,6 +8509,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_args typedOther = (get_type_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5491,9 +8543,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { @@ -5502,12 +8553,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5542,38 +8591,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_type_result implements TBase, java.io.Serializable, Cloneable { + public static class get_type_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_type_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Type success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Type.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_type_result.class, metaDataMap); } @@ -5606,11 +8714,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_type_result clone() { + public get_type_result deepCopy() { return new get_type_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + public Type getSuccess() { return this.success; } @@ -5623,11 +8737,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -5640,11 +8760,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -5657,13 +8783,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -5688,13 +8820,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -5704,23 +8834,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -5762,13 +8894,58 @@ public class ThriftHiveMetastore { if (!this.o2.equals(that.o2)) return false; } - - return true; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_result typedOther = (get_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; } - @Override - public int hashCode() { - return 0; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { @@ -5780,9 +8957,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Type(); this.success.read(iprot); @@ -5790,7 +8966,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -5798,7 +8974,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -5808,12 +8984,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5871,28 +9045,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class create_type_args implements TBase, java.io.Serializable, Cloneable { + public static class create_type_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_type_args"); + private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRUCT, (short)1); private Type type; - public static final int TYPE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TYPE((short)1, "type"); + + 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: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Type.class))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Type.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_type_args.class, metaDataMap); } @@ -5915,11 +9144,15 @@ public class ThriftHiveMetastore { } } - @Override - public create_type_args clone() { + public create_type_args deepCopy() { return new create_type_args(this); } + @Override + public void clear() { + this.type = null; + } + public Type getType() { return this.type; } @@ -5932,13 +9165,19 @@ public class ThriftHiveMetastore { this.type = null; } - // Returns true if field type is set (has been asigned a value) and false otherwise + /** Returns true if field type is set (has been asigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case TYPE: if (value == null) { unsetType(); @@ -5947,29 +9186,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case TYPE: return getType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case TYPE: return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -6002,6 +9241,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_args typedOther = (create_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6011,9 +9275,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TYPE: + switch (field.id) { + case 1: // TYPE if (field.type == TType.STRUCT) { this.type = new Type(); this.type.read(iprot); @@ -6023,12 +9286,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6063,44 +9324,106 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class create_type_result implements TBase, java.io.Serializable, Cloneable { + public static class create_type_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_type_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private boolean success; - public static final int SUCCESS = 0; private AlreadyExistsException o1; - public static final int O1 = 1; private InvalidObjectException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean success = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_type_result.class, metaDataMap); } @@ -6115,7 +9438,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; this.o3 = o3; @@ -6125,7 +9448,8 @@ public class ThriftHiveMetastore { * Performs a deep copy on other. */ public create_type_result(create_type_result other) { - __isset.success = other.__isset.success; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetO1()) { this.o1 = new AlreadyExistsException(other.o1); @@ -6138,27 +9462,39 @@ public class ThriftHiveMetastore { } } - @Override - public create_type_result clone() { + public create_type_result deepCopy() { return new create_type_result(this); } + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public boolean isSuccess() { return this.success; } public void setSuccess(boolean success) { this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); } public void unsetSuccess() { - this.__isset.success = false; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.__isset.success; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public AlreadyExistsException getO1() { @@ -6173,11 +9509,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -6190,11 +9532,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -6207,13 +9555,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -6246,13 +9600,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -6265,14 +9617,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -6281,9 +9636,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -6343,6 +9697,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_type_result typedOther = (create_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6352,17 +9761,16 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.BOOL) { this.success = iprot.readBool(); - this.__isset.success = true; + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); @@ -6370,7 +9778,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); @@ -6378,7 +9786,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -6388,12 +9796,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6459,28 +9865,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_type_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_type_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_type_args"); + private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)1); private String type; - public static final int TYPE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TYPE((short)1, "type"); + + 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: // TYPE + return TYPE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_type_args.class, metaDataMap); } @@ -6503,11 +9964,15 @@ public class ThriftHiveMetastore { } } - @Override - public drop_type_args clone() { + public drop_type_args deepCopy() { return new drop_type_args(this); } + @Override + public void clear() { + this.type = null; + } + public String getType() { return this.type; } @@ -6520,13 +9985,19 @@ public class ThriftHiveMetastore { this.type = null; } - // Returns true if field type is set (has been asigned a value) and false otherwise + /** Returns true if field type is set (has been asigned a value) and false otherwise */ public boolean isSetType() { return this.type != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTypeIsSet(boolean value) { + if (!value) { + this.type = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case TYPE: if (value == null) { unsetType(); @@ -6535,29 +10006,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case TYPE: return getType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case TYPE: return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -6590,6 +10061,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_type_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_args typedOther = (drop_type_args)other; + + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType()) { + lastComparison = TBaseHelper.compareTo(this.type, typedOther.type); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6599,9 +10095,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TYPE: + switch (field.id) { + case 1: // TYPE if (field.type == TType.STRING) { this.type = iprot.readString(); } else { @@ -6610,12 +10105,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6650,39 +10143,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_type_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_type_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_type_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private boolean success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean success = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_type_result.class, metaDataMap); } @@ -6696,7 +10249,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -6705,7 +10258,8 @@ public class ThriftHiveMetastore { * Performs a deep copy on other. */ public drop_type_result(drop_type_result other) { - __isset.success = other.__isset.success; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.success = other.success; if (other.isSetO1()) { this.o1 = new MetaException(other.o1); @@ -6715,27 +10269,38 @@ public class ThriftHiveMetastore { } } - @Override - public drop_type_result clone() { + public drop_type_result deepCopy() { return new drop_type_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; - this.__isset.success = true; + setSuccessIsSet(true); } public void unsetSuccess() { - this.__isset.success = false; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.__isset.success; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public MetaException getO1() { @@ -6750,11 +10315,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -6767,13 +10338,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -6798,13 +10375,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -6814,23 +10389,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -6881,6 +10458,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_type_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_type_result typedOther = (drop_type_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6890,17 +10512,16 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.BOOL) { this.success = iprot.readBool(); - this.__isset.success = true; + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -6908,7 +10529,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -6918,12 +10539,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6977,28 +10596,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable { + public static class get_type_all_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_type_all_args"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private String name; - public static final int NAME = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "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: // NAME + return 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_type_all_args.class, metaDataMap); } @@ -7021,11 +10695,15 @@ public class ThriftHiveMetastore { } } - @Override - public get_type_all_args clone() { + public get_type_all_args deepCopy() { return new get_type_all_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -7038,13 +10716,19 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -7053,29 +10737,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -7108,6 +10792,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_type_all_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_args typedOther = (get_type_all_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7117,9 +10826,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { @@ -7128,12 +10836,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7168,35 +10874,92 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable { + public static class get_type_all_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_type_all_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); private Map success; - public static final int SUCCESS = 0; private MetaException o2; - public static final int O2 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new StructMetaData(TType.STRUCT, Type.class)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_type_all_result.class, metaDataMap); } @@ -7236,11 +10999,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_type_all_result clone() { + public get_type_all_result deepCopy() { return new get_type_all_result(this); } + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -7264,11 +11032,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -7281,13 +11055,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -7304,34 +11084,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -7373,6 +11153,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_type_all_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_type_all_result typedOther = (get_type_all_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7382,9 +11197,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.MAP) { { TMap _map66 = iprot.readMapBegin(); @@ -7404,7 +11218,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 1: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -7414,12 +11228,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7430,7 +11242,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.success.size())); - for (Map.Entry _iter70 : this.success.entrySet()) { + for (Map.Entry _iter70 : this.success.entrySet()) + { oprot.writeString(_iter70.getKey()); _iter70.getValue().write(oprot); } @@ -7472,33 +11285,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { + public static class get_fields_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_fields_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); private String db_name; - public static final int DB_NAME = 1; private String table_name; - public static final int TABLE_NAME = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_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: // TABLE_NAME + return TABLE_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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_fields_args.class, metaDataMap); } @@ -7526,11 +11396,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_fields_args clone() { + public get_fields_args deepCopy() { return new get_fields_args(this); } + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + public String getDb_name() { return this.db_name; } @@ -7543,11 +11418,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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 getTable_name() { return this.table_name; } @@ -7560,13 +11441,19 @@ public class ThriftHiveMetastore { this.table_name = null; } - // Returns true if field table_name is set (has been asigned a value) and false otherwise + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -7583,34 +11470,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 TABLE_NAME: return isSetTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -7652,6 +11539,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_fields_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_args typedOther = (get_fields_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7661,16 +11583,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TABLE_NAME: + case 2: // TABLE_NAME if (field.type == TType.STRING) { this.table_name = iprot.readString(); } else { @@ -7679,12 +11600,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7732,44 +11651,105 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_fields_result implements TBase, java.io.Serializable, Cloneable { + public static class get_fields_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_fields_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private UnknownTableException o2; - public static final int O2 = 2; private UnknownDBException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_fields_result.class, metaDataMap); } @@ -7811,11 +11791,18 @@ public class ThriftHiveMetastore { } } - @Override - public get_fields_result clone() { + public get_fields_result deepCopy() { return new get_fields_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -7843,11 +11830,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -7860,11 +11853,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public UnknownTableException getO2() { return this.o2; } @@ -7877,11 +11876,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + public UnknownDBException getO3() { return this.o3; } @@ -7894,13 +11899,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -7933,13 +11944,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -7952,14 +11961,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -7968,9 +11980,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -8030,6 +12041,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_fields_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_fields_result typedOther = (get_fields_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8039,9 +12105,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list71 = iprot.readListBegin(); @@ -8059,7 +12124,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -8067,7 +12132,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new UnknownTableException(); this.o2.read(iprot); @@ -8075,7 +12140,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); @@ -8085,12 +12150,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8101,7 +12164,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter74 : this.success) { + for (FieldSchema _iter74 : this.success) + { _iter74.write(oprot); } oprot.writeListEnd(); @@ -8166,33 +12230,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { + public static class get_schema_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_schema_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TABLE_NAME_FIELD_DESC = new TField("table_name", TType.STRING, (short)2); private String db_name; - public static final int DB_NAME = 1; private String table_name; - public static final int TABLE_NAME = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TABLE_NAME((short)2, "table_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: // TABLE_NAME + return TABLE_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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TABLE_NAME, new FieldMetaData("table_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_schema_args.class, metaDataMap); } @@ -8220,11 +12341,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_schema_args clone() { + public get_schema_args deepCopy() { return new get_schema_args(this); } + @Override + public void clear() { + this.db_name = null; + this.table_name = null; + } + public String getDb_name() { return this.db_name; } @@ -8237,11 +12363,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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 getTable_name() { return this.table_name; } @@ -8254,13 +12386,19 @@ public class ThriftHiveMetastore { this.table_name = null; } - // Returns true if field table_name is set (has been asigned a value) and false otherwise + /** Returns true if field table_name is set (has been asigned a value) and false otherwise */ public boolean isSetTable_name() { return this.table_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTable_nameIsSet(boolean value) { + if (!value) { + this.table_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -8277,34 +12415,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); case TABLE_NAME: return getTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 TABLE_NAME: return isSetTable_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -8346,6 +12484,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_schema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_args typedOther = (get_schema_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTable_name()).compareTo(typedOther.isSetTable_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable_name()) { + lastComparison = TBaseHelper.compareTo(this.table_name, typedOther.table_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8355,16 +12528,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TABLE_NAME: + case 2: // TABLE_NAME if (field.type == TType.STRING) { this.table_name = iprot.readString(); } else { @@ -8373,12 +12545,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8426,44 +12596,105 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_schema_result implements TBase, java.io.Serializable, Cloneable { + public static class get_schema_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_schema_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private UnknownTableException o2; - public static final int O2 = 2; private UnknownDBException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_schema_result.class, metaDataMap); } @@ -8505,11 +12736,18 @@ public class ThriftHiveMetastore { } } - @Override - public get_schema_result clone() { + public get_schema_result deepCopy() { return new get_schema_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -8537,11 +12775,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -8554,11 +12798,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public UnknownTableException getO2() { return this.o2; } @@ -8571,11 +12821,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + public UnknownDBException getO3() { return this.o3; } @@ -8588,13 +12844,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -8627,13 +12889,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -8646,14 +12906,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -8662,9 +12925,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -8724,6 +12986,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_schema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_schema_result typedOther = (get_schema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8733,9 +13050,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list75 = iprot.readListBegin(); @@ -8753,7 +13069,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -8761,7 +13077,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new UnknownTableException(); this.o2.read(iprot); @@ -8769,7 +13085,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new UnknownDBException(); this.o3.read(iprot); @@ -8779,12 +13095,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8795,7 +13109,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (FieldSchema _iter78 : this.success) { + for (FieldSchema _iter78 : this.success) + { _iter78.write(oprot); } oprot.writeListEnd(); @@ -8860,28 +13175,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class create_table_args implements TBase, java.io.Serializable, Cloneable { + public static class create_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_table_args"); + private static final TField TBL_FIELD_DESC = new TField("tbl", TType.STRUCT, (short)1); private Table tbl; - public static final int TBL = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TBL((short)1, "tbl"); + + 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: // TBL + return TBL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TBL, new FieldMetaData("tbl", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_table_args.class, metaDataMap); } @@ -8904,11 +13274,15 @@ public class ThriftHiveMetastore { } } - @Override - public create_table_args clone() { + public create_table_args deepCopy() { return new create_table_args(this); } + @Override + public void clear() { + this.tbl = null; + } + public Table getTbl() { return this.tbl; } @@ -8921,13 +13295,19 @@ public class ThriftHiveMetastore { this.tbl = null; } - // Returns true if field tbl is set (has been asigned a value) and false otherwise + /** Returns true if field tbl is set (has been asigned a value) and false otherwise */ public boolean isSetTbl() { return this.tbl != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTblIsSet(boolean value) { + if (!value) { + this.tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case TBL: if (value == null) { unsetTbl(); @@ -8936,29 +13316,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case TBL: return getTbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case TBL: return isSetTbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -8991,6 +13371,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_args typedOther = (create_table_args)other; + + lastComparison = Boolean.valueOf(isSetTbl()).compareTo(typedOther.isSetTbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl()) { + lastComparison = TBaseHelper.compareTo(this.tbl, typedOther.tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9000,9 +13405,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TBL: + switch (field.id) { + case 1: // TBL if (field.type == TType.STRUCT) { this.tbl = new Table(); this.tbl.read(iprot); @@ -9012,12 +13416,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -9052,43 +13454,104 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class create_table_result implements TBase, java.io.Serializable, Cloneable { + public static class create_table_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("create_table_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private static final TField O4_FIELD_DESC = new TField("o4", TType.STRUCT, (short)4); private AlreadyExistsException o1; - public static final int O1 = 1; private InvalidObjectException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; private NoSuchObjectException o4; - public static final int O4 = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + 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 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O4, new FieldMetaData("o4", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(create_table_result.class, metaDataMap); } @@ -9126,11 +13589,18 @@ public class ThriftHiveMetastore { } } - @Override - public create_table_result clone() { + public create_table_result deepCopy() { return new create_table_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + this.o3 = null; + this.o4 = null; + } + public AlreadyExistsException getO1() { return this.o1; } @@ -9143,11 +13613,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -9160,11 +13636,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -9177,11 +13659,17 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + public NoSuchObjectException getO4() { return this.o4; } @@ -9194,13 +13682,19 @@ public class ThriftHiveMetastore { this.o4 = null; } - // Returns true if field o4 is set (has been asigned a value) and false otherwise + /** Returns true if field o4 is set (has been asigned a value) and false otherwise */ public boolean isSetO4() { return this.o4 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO4IsSet(boolean value) { + if (!value) { + this.o4 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -9233,13 +13727,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -9252,14 +13744,17 @@ public class ThriftHiveMetastore { case O4: return getO4(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O2: @@ -9268,9 +13763,8 @@ public class ThriftHiveMetastore { return isSetO3(); case O4: return isSetO4(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -9330,6 +13824,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(create_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + create_table_result typedOther = (create_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9339,9 +13888,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new AlreadyExistsException(); this.o1.read(iprot); @@ -9349,7 +13897,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new InvalidObjectException(); this.o2.read(iprot); @@ -9357,7 +13905,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -9365,7 +13913,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O4: + case 4: // O4 if (field.type == TType.STRUCT) { this.o4 = new NoSuchObjectException(); this.o4.read(iprot); @@ -9375,12 +13923,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -9450,39 +13996,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_table_args"); + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)2); private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)3); private String dbname; - public static final int DBNAME = 1; private String name; - public static final int NAME = 2; private boolean deleteData; - public static final int DELETEDATA = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + NAME((short)2, "name"), + DELETE_DATA((short)3, "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: // DBNAME + return DBNAME; + case 2: // NAME + return NAME; + case 3: // 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_table_args.class, metaDataMap); } @@ -9498,28 +14104,36 @@ public class ThriftHiveMetastore { this.dbname = dbname; this.name = name; this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_table_args(drop_table_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDbname()) { this.dbname = other.dbname; } if (other.isSetName()) { this.name = other.name; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override - public drop_table_args clone() { + public drop_table_args deepCopy() { return new drop_table_args(this); } + @Override + public void clear() { + this.dbname = null; + this.name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + public String getDbname() { return this.dbname; } @@ -9532,11 +14146,17 @@ public class ThriftHiveMetastore { this.dbname = null; } - // Returns true if field dbname is set (has been asigned a value) and false otherwise + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + public String getName() { return this.name; } @@ -9549,31 +14169,41 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } public void unsetDeleteData() { - this.__isset.deleteData = false; + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ public boolean isSetDeleteData() { - return this.__isset.deleteData; + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DBNAME: if (value == null) { unsetDbname(); @@ -9590,7 +14220,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -9598,39 +14228,39 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DBNAME: return getDbname(); case NAME: return getName(); - case DELETEDATA: + case DELETE_DATA: return new Boolean(isDeleteData()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case DBNAME: return isSetDbname(); case NAME: return isSetName(); - case DELETEDATA: + case DELETE_DATA: return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -9681,6 +14311,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_args typedOther = (drop_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9690,38 +14365,35 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DBNAME: + switch (field.id) { + case 1: // DBNAME if (field.type == TType.STRING) { this.dbname = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case NAME: + case 2: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: + case 3: // DELETE_DATA if (field.type == TType.BOOL) { this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -9776,33 +14448,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_table_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_table_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)2); private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o3; - public static final int O3 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + O1((short)1, "o1"), + O3((short)2, "o3"); + + 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: // O1 + return O1; + case 2: // O3 + return O3; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_table_result.class, metaDataMap); } @@ -9830,11 +14559,16 @@ public class ThriftHiveMetastore { } } - @Override - public drop_table_result clone() { + public drop_table_result deepCopy() { return new drop_table_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + public NoSuchObjectException getO1() { return this.o1; } @@ -9847,11 +14581,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public MetaException getO3() { return this.o3; } @@ -9864,13 +14604,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -9887,34 +14633,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -9956,6 +14702,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_table_result typedOther = (drop_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetO3()).compareTo(typedOther.isSetO3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO3()) { + lastComparison = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9965,9 +14746,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -9975,7 +14755,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 2: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -9985,12 +14765,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10036,33 +14814,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { + public static class get_tables_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_tables_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField PATTERN_FIELD_DESC = new TField("pattern", TType.STRING, (short)2); private String db_name; - public static final int DB_NAME = 1; private String pattern; - public static final int PATTERN = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + PATTERN((short)2, "pattern"); + + 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: // PATTERN + return PATTERN; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.PATTERN, new FieldMetaData("pattern", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_tables_args.class, metaDataMap); } @@ -10090,11 +14925,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_tables_args clone() { + public get_tables_args deepCopy() { return new get_tables_args(this); } + @Override + public void clear() { + this.db_name = null; + this.pattern = null; + } + public String getDb_name() { return this.db_name; } @@ -10107,11 +14947,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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 getPattern() { return this.pattern; } @@ -10124,13 +14970,19 @@ public class ThriftHiveMetastore { this.pattern = null; } - // Returns true if field pattern is set (has been asigned a value) and false otherwise + /** Returns true if field pattern is set (has been asigned a value) and false otherwise */ public boolean isSetPattern() { return this.pattern != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPatternIsSet(boolean value) { + if (!value) { + this.pattern = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -10147,34 +14999,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); case PATTERN: return getPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PATTERN: return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -10216,6 +15068,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_args typedOther = (get_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPattern()).compareTo(typedOther.isSetPattern()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPattern()) { + lastComparison = TBaseHelper.compareTo(this.pattern, typedOther.pattern); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10225,16 +15112,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PATTERN: + case 2: // PATTERN if (field.type == TType.STRING) { this.pattern = iprot.readString(); } else { @@ -10243,12 +15129,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10296,34 +15180,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { + public static class get_tables_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_tables_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_tables_result.class, metaDataMap); } @@ -10355,11 +15296,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_tables_result clone() { + public get_tables_result deepCopy() { return new get_tables_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -10387,11 +15333,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -10404,13 +15356,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -10427,34 +15385,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -10496,6 +15454,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_tables_result typedOther = (get_tables_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10505,9 +15498,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list79 = iprot.readListBegin(); @@ -10524,7 +15516,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -10534,12 +15526,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10550,7 +15540,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter82 : this.success) { + for (String _iter82 : this.success) + { oprot.writeString(_iter82); } oprot.writeListEnd(); @@ -10591,28 +15582,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { + public static class get_all_tables_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private String db_name; - public static final int DB_NAME = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_all_tables_args.class, metaDataMap); } @@ -10635,11 +15681,15 @@ public class ThriftHiveMetastore { } } - @Override - public get_all_tables_args clone() { + public get_all_tables_args deepCopy() { return new get_all_tables_args(this); } + @Override + public void clear() { + this.db_name = null; + } + public String getDb_name() { return this.db_name; } @@ -10652,13 +15702,19 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned a value) and false otherwise */ public boolean isSetDb_name() { return this.db_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setDb_nameIsSet(boolean value) { + if (!value) { + this.db_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -10667,29 +15723,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case DB_NAME: return isSetDb_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -10722,6 +15778,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_all_tables_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_args typedOther = (get_all_tables_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = TBaseHelper.compareTo(this.db_name, typedOther.db_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10731,9 +15812,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { @@ -10742,12 +15822,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10782,34 +15860,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable { + public static class get_all_tables_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_all_tables_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_all_tables_result.class, metaDataMap); } @@ -10841,11 +15976,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_all_tables_result clone() { + public get_all_tables_result deepCopy() { return new get_all_tables_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -10873,11 +16013,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -10890,13 +16036,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -10913,34 +16065,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -10982,6 +16134,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_all_tables_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_all_tables_result typedOther = (get_all_tables_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10991,9 +16178,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list83 = iprot.readListBegin(); @@ -11010,7 +16196,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -11020,12 +16206,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11036,7 +16220,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter86 : this.success) { + for (String _iter86 : this.success) + { oprot.writeString(_iter86); } oprot.writeListEnd(); @@ -11075,35 +16260,92 @@ public class ThriftHiveMetastore { return sb.toString(); } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } + public void validate() throws TException { + // check for required fields + } + + } + + public static class get_table_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); + + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + + private String dbname; + private String tbl_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_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: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_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); + } - public static class get_table_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_table_args"); - private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private final short _thriftId; + private final String _fieldName; - private String dbname; - public static final int DBNAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_table_args.class, metaDataMap); } @@ -11131,11 +16373,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_table_args clone() { + public get_table_args deepCopy() { return new get_table_args(this); } + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + } + public String getDbname() { return this.dbname; } @@ -11148,11 +16395,17 @@ public class ThriftHiveMetastore { this.dbname = null; } - // Returns true if field dbname is set (has been asigned a value) and false otherwise + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + public String getTbl_name() { return this.tbl_name; } @@ -11165,13 +16418,19 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned a value) and false otherwise */ public boolean isSetTbl_name() { return this.tbl_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setTbl_nameIsSet(boolean value) { + if (!value) { + this.tbl_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DBNAME: if (value == null) { unsetDbname(); @@ -11188,34 +16447,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DBNAME: return getDbname(); case TBL_NAME: return getTbl_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -11257,6 +16516,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_args typedOther = (get_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11266,16 +16560,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DBNAME: + switch (field.id) { + case 1: // DBNAME if (field.type == TType.STRING) { this.dbname = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { @@ -11284,12 +16577,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11337,38 +16628,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_table_result implements TBase, java.io.Serializable, Cloneable { + public static class get_table_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_table_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Table success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Table.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_table_result.class, metaDataMap); } @@ -11401,11 +16751,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_table_result clone() { + public get_table_result deepCopy() { return new get_table_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + public Table getSuccess() { return this.success; } @@ -11418,11 +16774,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -11435,11 +16797,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -11452,13 +16820,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -11483,13 +16857,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -11499,23 +16871,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -11566,6 +16940,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_table_result typedOther = (get_table_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11575,9 +16994,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Table(); this.success.read(iprot); @@ -11585,7 +17003,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -11593,7 +17011,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -11603,12 +17021,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11666,38 +17082,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { + public static class alter_table_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("alter_table_args"); + private static final TField DBNAME_FIELD_DESC = new TField("dbname", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField NEW_TBL_FIELD_DESC = new TField("new_tbl", TType.STRUCT, (short)3); private String dbname; - public static final int DBNAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private Table new_tbl; - public static final int NEW_TBL = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DBNAME((short)1, "dbname"), + TBL_NAME((short)2, "tbl_name"), + NEW_TBL((short)3, "new_tbl"); + + 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: // DBNAME + return DBNAME; + case 2: // TBL_NAME + return TBL_NAME; + case 3: // NEW_TBL + return NEW_TBL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DBNAME, new FieldMetaData("dbname", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NEW_TBL, new FieldMetaData("new_tbl", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Table.class))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(alter_table_args.class, metaDataMap); } @@ -11730,11 +17205,17 @@ public class ThriftHiveMetastore { } } - @Override - public alter_table_args clone() { + public alter_table_args deepCopy() { return new alter_table_args(this); } + @Override + public void clear() { + this.dbname = null; + this.tbl_name = null; + this.new_tbl = null; + } + public String getDbname() { return this.dbname; } @@ -11747,11 +17228,17 @@ public class ThriftHiveMetastore { this.dbname = null; } - // Returns true if field dbname is set (has been asigned a value) and false otherwise + /** Returns true if field dbname is set (has been asigned a value) and false otherwise */ public boolean isSetDbname() { return this.dbname != null; } + public void setDbnameIsSet(boolean value) { + if (!value) { + this.dbname = null; + } + } + public String getTbl_name() { return this.tbl_name; } @@ -11764,11 +17251,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 Table getNew_tbl() { return this.new_tbl; } @@ -11781,13 +17274,19 @@ public class ThriftHiveMetastore { this.new_tbl = null; } - // Returns true if field new_tbl is set (has been asigned a value) and false otherwise + /** Returns true if field new_tbl is set (has been asigned a value) and false otherwise */ public boolean isSetNew_tbl() { return this.new_tbl != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNew_tblIsSet(boolean value) { + if (!value) { + this.new_tbl = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DBNAME: if (value == null) { unsetDbname(); @@ -11812,13 +17311,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DBNAME: return getDbname(); @@ -11828,23 +17325,25 @@ public class ThriftHiveMetastore { case NEW_TBL: return getNew_tbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); case NEW_TBL: return isSetNew_tbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -11895,6 +17394,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(alter_table_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_args typedOther = (alter_table_args)other; + + lastComparison = Boolean.valueOf(isSetDbname()).compareTo(typedOther.isSetDbname()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDbname()) { + lastComparison = TBaseHelper.compareTo(this.dbname, typedOther.dbname); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTbl_name()).compareTo(typedOther.isSetTbl_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTbl_name()) { + lastComparison = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_tbl()).compareTo(typedOther.isSetNew_tbl()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_tbl()) { + lastComparison = TBaseHelper.compareTo(this.new_tbl, typedOther.new_tbl); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11904,23 +17448,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DBNAME: + switch (field.id) { + case 1: // DBNAME if (field.type == TType.STRING) { this.dbname = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case NEW_TBL: + case 3: // NEW_TBL if (field.type == TType.STRUCT) { this.new_tbl = new Table(); this.new_tbl.read(iprot); @@ -11930,12 +17473,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11996,33 +17537,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { + public static class alter_table_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("alter_table_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private InvalidOperationException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + 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 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(alter_table_result.class, metaDataMap); } @@ -12050,11 +17648,16 @@ public class ThriftHiveMetastore { } } - @Override - public alter_table_result clone() { + public alter_table_result deepCopy() { return new alter_table_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + public InvalidOperationException getO1() { return this.o1; } @@ -12067,11 +17670,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -12084,13 +17693,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -12107,34 +17722,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -12176,6 +17791,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(alter_table_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_table_result typedOther = (alter_table_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12185,9 +17835,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); @@ -12195,7 +17844,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -12205,12 +17854,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12249,35 +17896,90 @@ public class ThriftHiveMetastore { } else { sb.append(this.o2); } - first = false; - sb.append(")"); - return sb.toString(); - } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + + } + + public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); + + private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + + private Partition new_part; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NEW_PART((short)1, "new_part"); + + 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: // NEW_PART + return NEW_PART; + 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; + } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } + /** + * 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; - public static class add_partition_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("add_partition_args"); - private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)1); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - private Partition new_part; - public static final int NEW_PART = 1; + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Partition.class))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Partition.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(add_partition_args.class, metaDataMap); } @@ -12300,11 +18002,15 @@ public class ThriftHiveMetastore { } } - @Override - public add_partition_args clone() { + public add_partition_args deepCopy() { return new add_partition_args(this); } + @Override + public void clear() { + this.new_part = null; + } + public Partition getNew_part() { return this.new_part; } @@ -12317,13 +18023,19 @@ public class ThriftHiveMetastore { this.new_part = null; } - // Returns true if field new_part is set (has been asigned a value) and false otherwise + /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NEW_PART: if (value == null) { unsetNew_part(); @@ -12332,29 +18044,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NEW_PART: return getNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NEW_PART: return isSetNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -12387,6 +18099,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(add_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_args typedOther = (add_partition_args)other; + + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12396,9 +18133,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NEW_PART: + switch (field.id) { + case 1: // NEW_PART if (field.type == TType.STRUCT) { this.new_part = new Partition(); this.new_part.read(iprot); @@ -12408,12 +18144,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12448,43 +18182,104 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { + public static class add_partition_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("add_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private Partition success; - public static final int SUCCESS = 0; private InvalidObjectException o1; - public static final int O1 = 1; private AlreadyExistsException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(add_partition_result.class, metaDataMap); } @@ -12522,11 +18317,18 @@ public class ThriftHiveMetastore { } } - @Override - public add_partition_result clone() { + public add_partition_result deepCopy() { return new add_partition_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public Partition getSuccess() { return this.success; } @@ -12539,11 +18341,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public InvalidObjectException getO1() { return this.o1; } @@ -12556,11 +18364,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public AlreadyExistsException getO2() { return this.o2; } @@ -12573,11 +18387,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -12590,13 +18410,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -12629,13 +18455,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -12648,14 +18472,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -12664,9 +18491,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -12726,6 +18552,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(add_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_partition_result typedOther = (add_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12735,9 +18616,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); @@ -12745,7 +18625,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); @@ -12753,7 +18633,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); @@ -12761,7 +18641,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -12771,12 +18651,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12846,39 +18724,98 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { + public static class append_partition_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("append_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private List part_vals; - public static final int PART_VALS = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); + + 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: // PART_VALS + return PART_VALS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(append_partition_args.class, metaDataMap); } @@ -12915,11 +18852,17 @@ public class ThriftHiveMetastore { } } - @Override - public append_partition_args clone() { + public append_partition_args deepCopy() { return new append_partition_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + public String getDb_name() { return this.db_name; } @@ -12932,11 +18875,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -12949,11 +18898,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } @@ -12981,13 +18936,19 @@ public class ThriftHiveMetastore { this.part_vals = null; } - // Returns true if field part_vals is set (has been asigned a value) and false otherwise + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -13012,13 +18973,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -13028,23 +18987,25 @@ public class ThriftHiveMetastore { case PART_VALS: return getPart_vals(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_VALS: return isSetPart_vals(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -13095,6 +19056,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(append_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_args typedOther = (append_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13104,23 +19110,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case 3: // PART_VALS if (field.type == TType.LIST) { { TList _list87 = iprot.readListBegin(); @@ -13139,12 +19144,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13166,7 +19169,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter90 : this.part_vals) { + for (String _iter90 : this.part_vals) + { oprot.writeString(_iter90); } oprot.writeListEnd(); @@ -13211,43 +19215,104 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { + public static class append_partition_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("append_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private Partition success; - public static final int SUCCESS = 0; private InvalidObjectException o1; - public static final int O1 = 1; private AlreadyExistsException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(append_partition_result.class, metaDataMap); } @@ -13285,11 +19350,18 @@ public class ThriftHiveMetastore { } } - @Override - public append_partition_result clone() { + public append_partition_result deepCopy() { return new append_partition_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public Partition getSuccess() { return this.success; } @@ -13302,11 +19374,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public InvalidObjectException getO1() { return this.o1; } @@ -13319,11 +19397,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public AlreadyExistsException getO2() { return this.o2; } @@ -13336,11 +19420,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -13353,13 +19443,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -13392,13 +19488,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -13411,14 +19505,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -13427,9 +19524,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -13489,6 +19585,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(append_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_result typedOther = (append_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13498,9 +19649,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); @@ -13508,7 +19658,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); @@ -13516,7 +19666,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); @@ -13524,7 +19674,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -13534,12 +19684,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13607,40 +19755,99 @@ public class ThriftHiveMetastore { return sb.toString(); } - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } + public void validate() throws TException { + // check for required fields + } + + } + + public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + + private String db_name; + private String tbl_name; + private String part_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_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: // PART_NAME + return PART_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); + } - public static class append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); + private final short _thriftId; + private final String _fieldName; - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String part_name; - public static final int PART_NAME = 3; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(append_partition_by_name_args.class, metaDataMap); } @@ -13673,11 +19880,17 @@ public class ThriftHiveMetastore { } } - @Override - public append_partition_by_name_args clone() { + public append_partition_by_name_args deepCopy() { return new append_partition_by_name_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + public String getDb_name() { return this.db_name; } @@ -13690,11 +19903,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -13707,11 +19926,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 getPart_name() { return this.part_name; } @@ -13724,13 +19949,19 @@ public class ThriftHiveMetastore { this.part_name = null; } - // Returns true if field part_name is set (has been asigned a value) and false otherwise + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -13755,13 +19986,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -13771,23 +20000,25 @@ public class ThriftHiveMetastore { case PART_NAME: return getPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -13838,6 +20069,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(append_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_args typedOther = (append_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13847,23 +20123,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_NAME: + case 3: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { @@ -13872,12 +20147,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13938,43 +20211,104 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + public static class append_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("append_partition_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private Partition success; - public static final int SUCCESS = 0; private InvalidObjectException o1; - public static final int O1 = 1; private AlreadyExistsException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(append_partition_by_name_result.class, metaDataMap); } @@ -14012,11 +20346,18 @@ public class ThriftHiveMetastore { } } - @Override - public append_partition_by_name_result clone() { + public append_partition_by_name_result deepCopy() { return new append_partition_by_name_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public Partition getSuccess() { return this.success; } @@ -14029,11 +20370,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public InvalidObjectException getO1() { return this.o1; } @@ -14046,11 +20393,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public AlreadyExistsException getO2() { return this.o2; } @@ -14063,11 +20416,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -14080,13 +20439,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -14119,13 +20484,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -14138,14 +20501,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -14154,9 +20520,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -14216,6 +20581,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(append_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + append_partition_by_name_result typedOther = (append_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14225,9 +20645,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); @@ -14235,7 +20654,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); @@ -14243,7 +20662,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); @@ -14251,7 +20670,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -14261,12 +20680,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -14336,45 +20753,107 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_partition_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private List part_vals; - public static final int PART_VALS = 3; private boolean deleteData; - public static final int DELETEDATA = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + 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: // PART_VALS + return PART_VALS; + 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_partition_args.class, metaDataMap); } @@ -14392,13 +20871,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.part_vals = part_vals; this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_partition_args(drop_partition_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -14412,15 +20893,22 @@ public class ThriftHiveMetastore { } this.part_vals = __this__part_vals; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override - public drop_partition_args clone() { + public drop_partition_args deepCopy() { return new drop_partition_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + public String getDb_name() { return this.db_name; } @@ -14433,11 +20921,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -14450,11 +20944,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } @@ -14482,31 +20982,41 @@ public class ThriftHiveMetastore { this.part_vals = null; } - // Returns true if field part_vals is set (has been asigned a value) and false otherwise + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } public void unsetDeleteData() { - this.__isset.deleteData = false; + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ public boolean isSetDeleteData() { - return this.__isset.deleteData; + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -14531,7 +21041,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -14539,13 +21049,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -14555,28 +21063,30 @@ public class ThriftHiveMetastore { case PART_VALS: return getPart_vals(); - case DELETEDATA: + case DELETE_DATA: return new Boolean(isDeleteData()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_VALS: return isSetPart_vals(); - case DELETEDATA: + case DELETE_DATA: return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -14636,6 +21146,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_args typedOther = (drop_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14645,23 +21210,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case 3: // PART_VALS if (field.type == TType.LIST) { { TList _list91 = iprot.readListBegin(); @@ -14678,22 +21242,20 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: + case 4: // DELETE_DATA if (field.type == TType.BOOL) { this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -14715,7 +21277,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter94 : this.part_vals) { + for (String _iter94 : this.part_vals) + { oprot.writeString(_iter94); } oprot.writeListEnd(); @@ -14767,39 +21330,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_partition_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private boolean success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean success = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_partition_result.class, metaDataMap); } @@ -14813,7 +21436,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -14822,7 +21445,8 @@ public class ThriftHiveMetastore { * Performs a deep copy on other. */ public drop_partition_result(drop_partition_result other) { - __isset.success = other.__isset.success; + __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); @@ -14832,27 +21456,38 @@ public class ThriftHiveMetastore { } } - @Override - public drop_partition_result clone() { + public drop_partition_result deepCopy() { return new drop_partition_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; - this.__isset.success = true; + setSuccessIsSet(true); } public void unsetSuccess() { - this.__isset.success = false; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.__isset.success; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -14867,11 +21502,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -14884,13 +21525,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -14915,13 +21562,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -14931,23 +21576,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -14998,6 +21645,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_result typedOther = (drop_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15007,17 +21699,16 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.BOOL) { this.success = iprot.readBool(); - this.__isset.success = true; + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -15025,7 +21716,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -15035,12 +21726,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -15094,44 +21783,106 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private String part_name; - public static final int PART_NAME = 3; private boolean deleteData; - public static final int DELETEDATA = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_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: // PART_NAME + return PART_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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_partition_by_name_args.class, metaDataMap); } @@ -15149,13 +21900,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.part_name = part_name; this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } /** * Performs a deep copy on other. */ public drop_partition_by_name_args(drop_partition_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; } @@ -15165,15 +21918,22 @@ public class ThriftHiveMetastore { if (other.isSetPart_name()) { this.part_name = other.part_name; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override - public drop_partition_by_name_args clone() { + public drop_partition_by_name_args deepCopy() { return new drop_partition_by_name_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + setDeleteDataIsSet(false); + this.deleteData = false; + } + public String getDb_name() { return this.db_name; } @@ -15186,11 +21946,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -15203,11 +21969,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 getPart_name() { return this.part_name; } @@ -15220,31 +21992,41 @@ public class ThriftHiveMetastore { this.part_name = null; } - // Returns true if field part_name is set (has been asigned a value) and false otherwise + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + public boolean isDeleteData() { return this.deleteData; } public void setDeleteData(boolean deleteData) { this.deleteData = deleteData; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } public void unsetDeleteData() { - this.__isset.deleteData = false; + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ public boolean isSetDeleteData() { - return this.__isset.deleteData; + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -15269,7 +22051,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -15277,13 +22059,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -15293,28 +22073,30 @@ public class ThriftHiveMetastore { case PART_NAME: return getPart_name(); - case DELETEDATA: + case DELETE_DATA: return new Boolean(isDeleteData()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_NAME: return isSetPart_name(); - case DELETEDATA: + case DELETE_DATA: return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -15374,6 +22156,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_by_name_args typedOther = (drop_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDeleteData()).compareTo(typedOther.isSetDeleteData()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDeleteData()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15383,45 +22220,42 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_NAME: + case 3: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: + case 4: // DELETE_DATA if (field.type == TType.BOOL) { this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -15489,39 +22323,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_partition_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private boolean success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean success = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_partition_by_name_result.class, metaDataMap); } @@ -15535,7 +22429,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -15544,7 +22438,8 @@ public class ThriftHiveMetastore { * Performs a deep copy on other. */ public drop_partition_by_name_result(drop_partition_by_name_result other) { - __isset.success = other.__isset.success; + __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); @@ -15554,27 +22449,38 @@ public class ThriftHiveMetastore { } } - @Override - public drop_partition_by_name_result clone() { + public drop_partition_by_name_result deepCopy() { return new drop_partition_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; - this.__isset.success = true; + setSuccessIsSet(true); } public void unsetSuccess() { - this.__isset.success = false; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.__isset.success; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -15589,11 +22495,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -15606,13 +22518,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -15637,13 +22555,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -15653,23 +22569,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -15720,6 +22638,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(drop_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + drop_partition_by_name_result typedOther = (drop_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15729,17 +22692,16 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.BOOL) { this.success = iprot.readBool(); - this.__isset.success = true; + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -15747,7 +22709,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -15757,12 +22719,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -15816,39 +22776,98 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private List part_vals; - public static final int PART_VALS = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"); + + 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: // PART_VALS + return PART_VALS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_args.class, metaDataMap); } @@ -15885,11 +22904,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_args clone() { + public get_partition_args deepCopy() { return new get_partition_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + } + public String getDb_name() { return this.db_name; } @@ -15902,11 +22927,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -15919,11 +22950,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } @@ -15951,13 +22988,19 @@ public class ThriftHiveMetastore { this.part_vals = null; } - // Returns true if field part_vals is set (has been asigned a value) and false otherwise + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -15982,13 +23025,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -15998,23 +23039,25 @@ public class ThriftHiveMetastore { case PART_VALS: return getPart_vals(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_VALS: return isSetPart_vals(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -16065,6 +23108,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_args typedOther = (get_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16074,23 +23162,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case 3: // PART_VALS if (field.type == TType.LIST) { { TList _list95 = iprot.readListBegin(); @@ -16109,12 +23196,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16136,7 +23221,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter98 : this.part_vals) { + for (String _iter98 : this.part_vals) + { oprot.writeString(_iter98); } oprot.writeListEnd(); @@ -16181,38 +23267,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Partition success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_result.class, metaDataMap); } @@ -16245,11 +23390,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_result clone() { + public get_partition_result deepCopy() { return new get_partition_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + public Partition getSuccess() { return this.success; } @@ -16262,11 +23413,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -16279,11 +23436,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -16296,13 +23459,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -16327,13 +23496,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -16343,23 +23510,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -16410,6 +23579,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_result typedOther = (get_partition_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16419,9 +23633,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); @@ -16429,7 +23642,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -16437,7 +23650,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -16447,12 +23660,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16510,38 +23721,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)3); - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private String part_name; - public static final int PART_NAME = 3; + private String db_name; + private String tbl_name; + private String part_name; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_NAME((short)3, "part_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: // PART_NAME + return PART_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; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_by_name_args.class, metaDataMap); } @@ -16574,11 +23844,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_by_name_args clone() { + public get_partition_by_name_args deepCopy() { return new get_partition_by_name_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_name = null; + } + public String getDb_name() { return this.db_name; } @@ -16591,11 +23867,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -16608,11 +23890,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 getPart_name() { return this.part_name; } @@ -16625,13 +23913,19 @@ public class ThriftHiveMetastore { this.part_name = null; } - // Returns true if field part_name is set (has been asigned a value) and false otherwise + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -16656,13 +23950,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -16672,23 +23964,25 @@ public class ThriftHiveMetastore { case PART_NAME: return getPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -16739,6 +24033,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_by_name_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_by_name_args typedOther = (get_partition_by_name_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16748,23 +24087,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_NAME: + case 3: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { @@ -16773,12 +24111,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16839,38 +24175,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_by_name_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Partition success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_by_name_result.class, metaDataMap); } @@ -16903,11 +24298,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_by_name_result clone() { + public get_partition_by_name_result deepCopy() { return new get_partition_by_name_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + } + public Partition getSuccess() { return this.success; } @@ -16920,11 +24321,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -16937,11 +24344,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -16954,13 +24367,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -16985,13 +24404,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -17001,23 +24418,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -17068,6 +24487,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_by_name_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_by_name_result typedOther = (get_partition_by_name_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17077,9 +24541,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Partition(); this.success.read(iprot); @@ -17087,7 +24550,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -17095,7 +24558,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -17105,12 +24568,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -17168,39 +24629,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private short max_parts; - public static final int MAX_PARTS = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + 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_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_args.class, metaDataMap); } @@ -17218,28 +24739,36 @@ public class ThriftHiveMetastore { this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_args(get_partitions_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; } - __isset.max_parts = other.__isset.max_parts; this.max_parts = other.max_parts; } - @Override - public get_partitions_args clone() { + public get_partitions_args deepCopy() { return new get_partitions_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + public String getDb_name() { return this.db_name; } @@ -17252,11 +24781,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -17269,31 +24804,41 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } public void unsetMax_parts() { - this.__isset.max_parts = false; + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ public boolean isSetMax_parts() { - return this.__isset.max_parts; + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -17318,13 +24863,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -17334,23 +24877,25 @@ public class ThriftHiveMetastore { case MAX_PARTS: return new Short(getMax_parts()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -17401,6 +24946,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_args typedOther = (get_partitions_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17410,38 +25000,35 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: + case 3: // MAX_PARTS if (field.type == TType.I16) { this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -17496,39 +25083,98 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private List success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_result.class, metaDataMap); } @@ -17565,11 +25211,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partitions_result clone() { + public get_partitions_result deepCopy() { return new get_partitions_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(); } @@ -17597,11 +25249,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -17614,11 +25272,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -17631,13 +25295,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -17662,13 +25332,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -17678,23 +25346,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -17745,6 +25415,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_result typedOther = (get_partitions_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17754,9 +25469,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list99 = iprot.readListBegin(); @@ -17774,7 +25488,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -17782,7 +25496,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -17792,12 +25506,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -17808,7 +25520,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter102 : this.success) { + for (Partition _iter102 : this.success) + { _iter102.write(oprot); } oprot.writeListEnd(); @@ -17861,39 +25574,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } - } + } + + public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); + + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); + private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); + private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + + private String db_name; + private String tbl_name; + private short max_parts; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + MAX_PARTS((short)3, "max_parts"); + + 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_PARTS + return MAX_PARTS; + 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); + } - public static class get_partition_names_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_args"); - private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); - private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); - private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)3); + private final short _thriftId; + private final String _fieldName; - private String db_name; - public static final int DB_NAME = 1; - private String tbl_name; - public static final int TBL_NAME = 2; - private short max_parts; - public static final int MAX_PARTS = 3; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_names_args.class, metaDataMap); } @@ -17911,28 +25684,36 @@ public class ThriftHiveMetastore { this.db_name = db_name; this.tbl_name = tbl_name; this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partition_names_args(get_partition_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; } - __isset.max_parts = other.__isset.max_parts; this.max_parts = other.max_parts; } - @Override - public get_partition_names_args clone() { + public get_partition_names_args deepCopy() { return new get_partition_names_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.max_parts = (short)-1; + + } + public String getDb_name() { return this.db_name; } @@ -17945,11 +25726,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -17962,31 +25749,41 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } public void unsetMax_parts() { - this.__isset.max_parts = false; + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ public boolean isSetMax_parts() { - return this.__isset.max_parts; + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -18011,13 +25808,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -18027,23 +25822,25 @@ public class ThriftHiveMetastore { case MAX_PARTS: return new Short(getMax_parts()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -18094,6 +25891,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_names_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_args typedOther = (get_partition_names_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18103,38 +25945,35 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: + case 3: // MAX_PARTS if (field.type == TType.I16) { this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -18189,34 +26028,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_names_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_names_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o2; - public static final int O2 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_names_result.class, metaDataMap); } @@ -18248,11 +26144,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_names_result clone() { + public get_partition_names_result deepCopy() { return new get_partition_names_result(this); } + @Override + public void clear() { + this.success = null; + this.o2 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -18280,11 +26181,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -18297,13 +26204,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -18320,34 +26233,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -18389,6 +26302,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_names_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_result typedOther = (get_partition_names_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18398,9 +26346,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list103 = iprot.readListBegin(); @@ -18417,7 +26364,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 1: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -18427,12 +26374,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -18443,7 +26388,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter106 : this.success) { + for (String _iter106 : this.success) + { oprot.writeString(_iter106); } oprot.writeListEnd(); @@ -18484,45 +26430,107 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_ps_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_ps_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private List part_vals; - public static final int PART_VALS = 3; private short max_parts; - public static final int MAX_PARTS = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); + + 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: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_ps_args.class, metaDataMap); } @@ -18542,13 +26550,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_ps_args(get_partitions_ps_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -18562,15 +26572,22 @@ public class ThriftHiveMetastore { } this.part_vals = __this__part_vals; } - __isset.max_parts = other.__isset.max_parts; this.max_parts = other.max_parts; } - @Override - public get_partitions_ps_args clone() { + public get_partitions_ps_args deepCopy() { return new get_partitions_ps_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + + } + public String getDb_name() { return this.db_name; } @@ -18583,11 +26600,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -18600,11 +26623,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } @@ -18632,31 +26661,41 @@ public class ThriftHiveMetastore { this.part_vals = null; } - // Returns true if field part_vals is set (has been asigned a value) and false otherwise + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } public void unsetMax_parts() { - this.__isset.max_parts = false; + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ public boolean isSetMax_parts() { - return this.__isset.max_parts; + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -18689,13 +26728,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -18708,14 +26745,17 @@ public class ThriftHiveMetastore { case MAX_PARTS: return new Short(getMax_parts()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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: @@ -18724,9 +26764,8 @@ public class ThriftHiveMetastore { return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -18786,6 +26825,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_ps_args typedOther = (get_partitions_ps_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18795,23 +26889,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case 3: // PART_VALS if (field.type == TType.LIST) { { TList _list107 = iprot.readListBegin(); @@ -18828,22 +26921,20 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: + case 4: // MAX_PARTS if (field.type == TType.I16) { this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -18865,7 +26956,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter110 : this.part_vals) { + for (String _iter110 : this.part_vals) + { oprot.writeString(_iter110); } oprot.writeListEnd(); @@ -18917,34 +27009,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_ps_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_ps_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_ps_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_ps_result.class, metaDataMap); } @@ -18976,11 +27125,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_partitions_ps_result clone() { + public get_partitions_ps_result deepCopy() { return new get_partitions_ps_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -19008,11 +27162,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -19025,13 +27185,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -19048,34 +27214,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -19117,6 +27283,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_ps_result typedOther = (get_partitions_ps_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19126,9 +27327,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list111 = iprot.readListBegin(); @@ -19146,7 +27346,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -19156,12 +27356,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -19172,7 +27370,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter114 : this.success) { + for (Partition _iter114 : this.success) + { _iter114.write(oprot); } oprot.writeListEnd(); @@ -19213,45 +27412,107 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_names_ps_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_names_ps_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField PART_VALS_FIELD_DESC = new TField("part_vals", TType.LIST, (short)3); private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private List part_vals; - public static final int PART_VALS = 3; private short max_parts; - public static final int MAX_PARTS = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + PART_VALS((short)3, "part_vals"), + MAX_PARTS((short)4, "max_parts"); + + 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: // PART_VALS + return PART_VALS; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.PART_VALS, new FieldMetaData("part_vals", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_names_ps_args.class, metaDataMap); } @@ -19271,13 +27532,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.part_vals = part_vals; this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partition_names_ps_args(get_partition_names_ps_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -19291,13 +27554,20 @@ public class ThriftHiveMetastore { } this.part_vals = __this__part_vals; } - __isset.max_parts = other.__isset.max_parts; this.max_parts = other.max_parts; } - @Override - public get_partition_names_ps_args clone() { - return new get_partition_names_ps_args(this); + public get_partition_names_ps_args deepCopy() { + return new get_partition_names_ps_args(this); + } + + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.part_vals = null; + this.max_parts = (short)-1; + } public String getDb_name() { @@ -19312,11 +27582,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -19329,11 +27605,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 int getPart_valsSize() { return (this.part_vals == null) ? 0 : this.part_vals.size(); } @@ -19361,31 +27643,41 @@ public class ThriftHiveMetastore { this.part_vals = null; } - // Returns true if field part_vals is set (has been asigned a value) and false otherwise + /** Returns true if field part_vals is set (has been asigned a value) and false otherwise */ public boolean isSetPart_vals() { return this.part_vals != null; } + public void setPart_valsIsSet(boolean value) { + if (!value) { + this.part_vals = null; + } + } + public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } public void unsetMax_parts() { - this.__isset.max_parts = false; + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ public boolean isSetMax_parts() { - return this.__isset.max_parts; + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); + } + + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -19418,13 +27710,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -19437,14 +27727,17 @@ public class ThriftHiveMetastore { case MAX_PARTS: return new Short(getMax_parts()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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: @@ -19453,9 +27746,8 @@ public class ThriftHiveMetastore { return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -19515,6 +27807,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_names_ps_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_ps_args typedOther = (get_partition_names_ps_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPart_vals()).compareTo(typedOther.isSetPart_vals()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_vals()) { + lastComparison = TBaseHelper.compareTo(this.part_vals, typedOther.part_vals); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19524,23 +27871,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case PART_VALS: + case 3: // PART_VALS if (field.type == TType.LIST) { { TList _list115 = iprot.readListBegin(); @@ -19557,22 +27903,20 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: + case 4: // MAX_PARTS if (field.type == TType.I16) { this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -19594,7 +27938,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(PART_VALS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.part_vals.size())); - for (String _iter118 : this.part_vals) { + for (String _iter118 : this.part_vals) + { oprot.writeString(_iter118); } oprot.writeListEnd(); @@ -19646,34 +27991,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partition_names_ps_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partition_names_ps_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partition_names_ps_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partition_names_ps_result.class, metaDataMap); } @@ -19705,11 +28107,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_partition_names_ps_result clone() { + public get_partition_names_ps_result deepCopy() { return new get_partition_names_ps_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -19737,11 +28144,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -19754,13 +28167,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -19777,34 +28196,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -19846,6 +28265,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partition_names_ps_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partition_names_ps_result typedOther = (get_partition_names_ps_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19855,9 +28309,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list119 = iprot.readListBegin(); @@ -19874,7 +28327,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -19884,12 +28337,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -19900,7 +28351,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter122 : this.success) { + for (String _iter122 : this.success) + { oprot.writeString(_iter122); } oprot.writeListEnd(); @@ -19941,44 +28393,106 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_by_filter_args implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_by_filter_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField FILTER_FIELD_DESC = new TField("filter", TType.STRING, (short)3); private static final TField MAX_PARTS_FIELD_DESC = new TField("max_parts", TType.I16, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private String filter; - public static final int FILTER = 3; private short max_parts; - public static final int MAX_PARTS = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_parts = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + FILTER((short)3, "filter"), + MAX_PARTS((short)4, "max_parts"); + + 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: // FILTER + return FILTER; + case 4: // MAX_PARTS + return MAX_PARTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __MAX_PARTS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.FILTER, new FieldMetaData("filter", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_PARTS, new FieldMetaData("max_parts", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_args.class, metaDataMap); } @@ -19998,13 +28512,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.filter = filter; this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } /** * Performs a deep copy on other. */ public get_partitions_by_filter_args(get_partitions_by_filter_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetDb_name()) { this.db_name = other.db_name; } @@ -20014,15 +28530,22 @@ public class ThriftHiveMetastore { if (other.isSetFilter()) { this.filter = other.filter; } - __isset.max_parts = other.__isset.max_parts; this.max_parts = other.max_parts; } - @Override - public get_partitions_by_filter_args clone() { + public get_partitions_by_filter_args deepCopy() { return new get_partitions_by_filter_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.filter = null; + this.max_parts = (short)-1; + + } + public String getDb_name() { return this.db_name; } @@ -20035,11 +28558,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -20052,11 +28581,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 getFilter() { return this.filter; } @@ -20069,31 +28604,41 @@ public class ThriftHiveMetastore { this.filter = null; } - // Returns true if field filter is set (has been asigned a value) and false otherwise + /** Returns true if field filter is set (has been asigned a value) and false otherwise */ public boolean isSetFilter() { return this.filter != null; } + public void setFilterIsSet(boolean value) { + if (!value) { + this.filter = null; + } + } + public short getMax_parts() { return this.max_parts; } public void setMax_parts(short max_parts) { this.max_parts = max_parts; - this.__isset.max_parts = true; + setMax_partsIsSet(true); } public void unsetMax_parts() { - this.__isset.max_parts = false; + __isset_bit_vector.clear(__MAX_PARTS_ISSET_ID); } - // Returns true if field max_parts is set (has been asigned a value) and false otherwise + /** Returns true if field max_parts is set (has been asigned a value) and false otherwise */ public boolean isSetMax_parts() { - return this.__isset.max_parts; + return __isset_bit_vector.get(__MAX_PARTS_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_partsIsSet(boolean value) { + __isset_bit_vector.set(__MAX_PARTS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -20126,13 +28671,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -20145,14 +28688,17 @@ public class ThriftHiveMetastore { case MAX_PARTS: return new Short(getMax_parts()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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: @@ -20161,9 +28707,8 @@ public class ThriftHiveMetastore { return isSetFilter(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -20223,6 +28768,61 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_by_filter_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_by_filter_args typedOther = (get_partitions_by_filter_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilter()).compareTo(typedOther.isSetFilter()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilter()) { + lastComparison = TBaseHelper.compareTo(this.filter, typedOther.filter); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMax_parts()).compareTo(typedOther.isSetMax_parts()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMax_parts()) { + lastComparison = TBaseHelper.compareTo(this.max_parts, typedOther.max_parts); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20232,45 +28832,42 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case FILTER: + case 3: // FILTER if (field.type == TType.STRING) { this.filter = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_PARTS: + case 4: // MAX_PARTS if (field.type == TType.I16) { this.max_parts = iprot.readI16(); - this.__isset.max_parts = true; + setMax_partsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -20338,39 +28935,98 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_partitions_by_filter_result implements TBase, java.io.Serializable, Cloneable { + public static class get_partitions_by_filter_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_partitions_by_filter_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private List success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Partition.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_partitions_by_filter_result.class, metaDataMap); } @@ -20407,11 +29063,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_partitions_by_filter_result clone() { + public get_partitions_by_filter_result deepCopy() { return new get_partitions_by_filter_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(); } @@ -20439,11 +29101,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -20456,11 +29124,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -20473,13 +29147,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -20504,13 +29184,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -20520,23 +29198,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -20587,6 +29267,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_partitions_by_filter_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_partitions_by_filter_result typedOther = (get_partitions_by_filter_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20596,9 +29321,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list123 = iprot.readListBegin(); @@ -20616,7 +29340,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -20624,7 +29348,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -20634,12 +29358,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -20650,7 +29372,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Partition _iter126 : this.success) { + for (Partition _iter126 : this.success) + { _iter126.write(oprot); } oprot.writeListEnd(); @@ -20703,38 +29426,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class alter_partition_args implements TBase, java.io.Serializable, Cloneable { + public static class alter_partition_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("alter_partition_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField NEW_PART_FIELD_DESC = new TField("new_part", TType.STRUCT, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private Partition new_part; - public static final int NEW_PART = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + DB_NAME((short)1, "db_name"), + TBL_NAME((short)2, "tbl_name"), + NEW_PART((short)3, "new_part"); + + 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: // NEW_PART + return NEW_PART; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.NEW_PART, new FieldMetaData("new_part", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Partition.class))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(alter_partition_args.class, metaDataMap); } @@ -20767,11 +29549,17 @@ public class ThriftHiveMetastore { } } - @Override - public alter_partition_args clone() { + public alter_partition_args deepCopy() { return new alter_partition_args(this); } + @Override + public void clear() { + this.db_name = null; + this.tbl_name = null; + this.new_part = null; + } + public String getDb_name() { return this.db_name; } @@ -20784,11 +29572,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -20801,11 +29595,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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 Partition getNew_part() { return this.new_part; } @@ -20818,13 +29618,19 @@ public class ThriftHiveMetastore { this.new_part = null; } - // Returns true if field new_part is set (has been asigned a value) and false otherwise + /** Returns true if field new_part is set (has been asigned a value) and false otherwise */ public boolean isSetNew_part() { return this.new_part != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setNew_partIsSet(boolean value) { + if (!value) { + this.new_part = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -20849,13 +29655,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -20865,23 +29669,25 @@ public class ThriftHiveMetastore { case NEW_PART: return getNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 NEW_PART: return isSetNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -20932,6 +29738,51 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(alter_partition_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_partition_args typedOther = (alter_partition_args)other; + + lastComparison = Boolean.valueOf(isSetDb_name()).compareTo(typedOther.isSetDb_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDb_name()) { + lastComparison = 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 = TBaseHelper.compareTo(this.tbl_name, typedOther.tbl_name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNew_part()).compareTo(typedOther.isSetNew_part()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_part()) { + lastComparison = TBaseHelper.compareTo(this.new_part, typedOther.new_part); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20941,23 +29792,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case NEW_PART: + case 3: // NEW_PART if (field.type == TType.STRUCT) { this.new_part = new Partition(); this.new_part.read(iprot); @@ -20967,12 +29817,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21033,33 +29881,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class alter_partition_result implements TBase, java.io.Serializable, Cloneable { + public static class alter_partition_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("alter_partition_result"); + private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private InvalidOperationException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + 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 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(alter_partition_result.class, metaDataMap); } @@ -21087,11 +29992,16 @@ public class ThriftHiveMetastore { } } - @Override - public alter_partition_result clone() { + public alter_partition_result deepCopy() { return new alter_partition_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + public InvalidOperationException getO1() { return this.o1; } @@ -21104,11 +30014,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -21121,13 +30037,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO2IsSet(boolean value) { + if (!value) { + this.o2 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case O1: if (value == null) { unsetO1(); @@ -21144,34 +30066,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -21213,6 +30135,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(alter_partition_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + alter_partition_result typedOther = (alter_partition_result)other; + + lastComparison = Boolean.valueOf(isSetO1()).compareTo(typedOther.isSetO1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetO1()) { + lastComparison = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21222,9 +30179,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case O1: + switch (field.id) { + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidOperationException(); this.o1.read(iprot); @@ -21232,7 +30188,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -21242,12 +30198,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21293,33 +30247,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_config_value_args implements TBase, java.io.Serializable, Cloneable { + public static class get_config_value_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_config_value_args"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField DEFAULT_VALUE_FIELD_DESC = new TField("defaultValue", TType.STRING, (short)2); private String name; - public static final int NAME = 1; private String defaultValue; - public static final int DEFAULTVALUE = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + DEFAULT_VALUE((short)2, "defaultValue"); + + 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: // NAME + return NAME; + case 2: // DEFAULT_VALUE + return DEFAULT_VALUE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(DEFAULTVALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.DEFAULT_VALUE, new FieldMetaData("defaultValue", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_config_value_args.class, metaDataMap); } @@ -21347,11 +30358,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_config_value_args clone() { + public get_config_value_args deepCopy() { return new get_config_value_args(this); } + @Override + public void clear() { + this.name = null; + this.defaultValue = null; + } + public String getName() { return this.name; } @@ -21364,11 +30380,17 @@ public class ThriftHiveMetastore { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public String getDefaultValue() { return this.defaultValue; } @@ -21381,13 +30403,19 @@ public class ThriftHiveMetastore { this.defaultValue = null; } - // Returns true if field defaultValue is set (has been asigned a value) and false otherwise + /** Returns true if field defaultValue is set (has been asigned a value) and false otherwise */ public boolean isSetDefaultValue() { return this.defaultValue != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setDefaultValueIsSet(boolean value) { + if (!value) { + this.defaultValue = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -21396,7 +30424,7 @@ public class ThriftHiveMetastore { } break; - case DEFAULTVALUE: + case DEFAULT_VALUE: if (value == null) { unsetDefaultValue(); } else { @@ -21404,34 +30432,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); - case DEFAULTVALUE: + case DEFAULT_VALUE: return getDefaultValue(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); - case DEFAULTVALUE: + case DEFAULT_VALUE: return isSetDefaultValue(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -21473,6 +30501,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_config_value_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_config_value_args typedOther = (get_config_value_args)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDefaultValue()).compareTo(typedOther.isSetDefaultValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDefaultValue()) { + lastComparison = TBaseHelper.compareTo(this.defaultValue, typedOther.defaultValue); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21482,16 +30545,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DEFAULTVALUE: + case 2: // DEFAULT_VALUE if (field.type == TType.STRING) { this.defaultValue = iprot.readString(); } else { @@ -21500,12 +30562,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21553,33 +30613,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_config_value_result implements TBase, java.io.Serializable, Cloneable { + public static class get_config_value_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_config_value_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private String success; - public static final int SUCCESS = 0; private ConfigValSecurityException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_config_value_result.class, metaDataMap); } @@ -21607,11 +30724,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_config_value_result clone() { + public get_config_value_result deepCopy() { return new get_config_value_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public String getSuccess() { return this.success; } @@ -21624,11 +30746,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public ConfigValSecurityException getO1() { return this.o1; } @@ -21641,13 +30769,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -21664,34 +30798,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -21733,6 +30867,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(get_config_value_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_config_value_result typedOther = (get_config_value_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21742,16 +30911,15 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRING) { this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new ConfigValSecurityException(); this.o1.read(iprot); @@ -21761,12 +30929,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21812,28 +30978,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class partition_name_to_vals_args implements TBase, java.io.Serializable, Cloneable { + public static class partition_name_to_vals_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_args"); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); private String part_name; - public static final int PART_NAME = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PART_NAME((short)1, "part_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: // PART_NAME + return PART_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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(partition_name_to_vals_args.class, metaDataMap); } @@ -21856,11 +31077,15 @@ public class ThriftHiveMetastore { } } - @Override - public partition_name_to_vals_args clone() { + public partition_name_to_vals_args deepCopy() { return new partition_name_to_vals_args(this); } + @Override + public void clear() { + this.part_name = null; + } + public String getPart_name() { return this.part_name; } @@ -21873,13 +31098,19 @@ public class ThriftHiveMetastore { this.part_name = null; } - // Returns true if field part_name is set (has been asigned a value) and false otherwise + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case PART_NAME: if (value == null) { unsetPart_name(); @@ -21888,29 +31119,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case PART_NAME: return getPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -21943,6 +31174,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(partition_name_to_vals_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_vals_args typedOther = (partition_name_to_vals_args)other; + + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21952,9 +31208,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case PART_NAME: + switch (field.id) { + case 1: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { @@ -21963,12 +31218,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22003,34 +31256,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class partition_name_to_vals_result implements TBase, java.io.Serializable, Cloneable { + public static class partition_name_to_vals_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_vals_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); - private List success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 1; + private List success; + private MetaException o1; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + 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; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(partition_name_to_vals_result.class, metaDataMap); } @@ -22062,11 +31372,16 @@ public class ThriftHiveMetastore { } } - @Override - public partition_name_to_vals_result clone() { + public partition_name_to_vals_result deepCopy() { return new partition_name_to_vals_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -22094,11 +31409,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -22111,13 +31432,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -22134,34 +31461,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -22203,6 +31530,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(partition_name_to_vals_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_vals_result typedOther = (partition_name_to_vals_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22212,9 +31574,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list127 = iprot.readListBegin(); @@ -22231,7 +31592,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -22241,12 +31602,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22257,7 +31616,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter130 : this.success) { + for (String _iter130 : this.success) + { oprot.writeString(_iter130); } oprot.writeListEnd(); @@ -22298,28 +31658,83 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { + public static class partition_name_to_spec_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_args"); + private static final TField PART_NAME_FIELD_DESC = new TField("part_name", TType.STRING, (short)1); private String part_name; - public static final int PART_NAME = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + PART_NAME((short)1, "part_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: // PART_NAME + return PART_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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.PART_NAME, new FieldMetaData("part_name", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(partition_name_to_spec_args.class, metaDataMap); } @@ -22342,11 +31757,15 @@ public class ThriftHiveMetastore { } } - @Override - public partition_name_to_spec_args clone() { + public partition_name_to_spec_args deepCopy() { return new partition_name_to_spec_args(this); } + @Override + public void clear() { + this.part_name = null; + } + public String getPart_name() { return this.part_name; } @@ -22359,13 +31778,19 @@ public class ThriftHiveMetastore { this.part_name = null; } - // Returns true if field part_name is set (has been asigned a value) and false otherwise + /** Returns true if field part_name is set (has been asigned a value) and false otherwise */ public boolean isSetPart_name() { return this.part_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setPart_nameIsSet(boolean value) { + if (!value) { + this.part_name = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case PART_NAME: if (value == null) { unsetPart_name(); @@ -22374,29 +31799,29 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case PART_NAME: return getPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -22429,6 +31854,31 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(partition_name_to_spec_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_spec_args typedOther = (partition_name_to_spec_args)other; + + lastComparison = Boolean.valueOf(isSetPart_name()).compareTo(typedOther.isSetPart_name()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPart_name()) { + lastComparison = TBaseHelper.compareTo(this.part_name, typedOther.part_name); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22438,9 +31888,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case PART_NAME: + switch (field.id) { + case 1: // PART_NAME if (field.type == TType.STRING) { this.part_name = iprot.readString(); } else { @@ -22449,12 +31898,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22489,35 +31936,92 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class partition_name_to_spec_result implements TBase, java.io.Serializable, Cloneable { + public static class partition_name_to_spec_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("partition_name_to_spec_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private Map success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(partition_name_to_spec_result.class, metaDataMap); } @@ -22557,11 +32061,16 @@ public class ThriftHiveMetastore { } } - @Override - public partition_name_to_spec_result clone() { + public partition_name_to_spec_result deepCopy() { return new partition_name_to_spec_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -22585,11 +32094,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -22602,13 +32117,19 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -22625,34 +32146,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O1: return getO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -22694,6 +32215,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(partition_name_to_spec_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + partition_name_to_spec_result typedOther = (partition_name_to_spec_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = TBaseHelper.compareTo(this.o1, typedOther.o1); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22703,9 +32259,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.MAP) { { TMap _map131 = iprot.readMapBegin(); @@ -22724,7 +32279,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -22734,12 +32289,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22750,7 +32303,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size())); - for (Map.Entry _iter135 : this.success.entrySet()) { + for (Map.Entry _iter135 : this.success.entrySet()) + { oprot.writeString(_iter135.getKey()); oprot.writeString(_iter135.getValue()); } @@ -22792,33 +32346,90 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class add_index_args implements TBase, java.io.Serializable, Cloneable { + public static class add_index_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("add_index_args"); + private static final TField NEW_INDEX_FIELD_DESC = new TField("new_index", TType.STRUCT, (short)1); private static final TField INDEX_TABLE_FIELD_DESC = new TField("index_table", TType.STRUCT, (short)2); private Index new_index; - public static final int NEW_INDEX = 1; private Table index_table; - public static final int INDEX_TABLE = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NEW_INDEX((short)1, "new_index"), + INDEX_TABLE((short)2, "index_table"); + + 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: // NEW_INDEX + return NEW_INDEX; + case 2: // INDEX_TABLE + return INDEX_TABLE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Index.class))); - put(INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, Table.class))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NEW_INDEX, new FieldMetaData("new_index", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Index.class))); + tmpMap.put(_Fields.INDEX_TABLE, new FieldMetaData("index_table", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, Table.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(add_index_args.class, metaDataMap); } @@ -22846,11 +32457,16 @@ public class ThriftHiveMetastore { } } - @Override - public add_index_args clone() { + public add_index_args deepCopy() { return new add_index_args(this); } + @Override + public void clear() { + this.new_index = null; + this.index_table = null; + } + public Index getNew_index() { return this.new_index; } @@ -22863,11 +32479,17 @@ public class ThriftHiveMetastore { this.new_index = null; } - // Returns true if field new_index is set (has been asigned a value) and false otherwise + /** Returns true if field new_index is set (has been asigned a value) and false otherwise */ public boolean isSetNew_index() { return this.new_index != null; } + public void setNew_indexIsSet(boolean value) { + if (!value) { + this.new_index = null; + } + } + public Table getIndex_table() { return this.index_table; } @@ -22880,13 +32502,19 @@ public class ThriftHiveMetastore { this.index_table = null; } - // Returns true if field index_table is set (has been asigned a value) and false otherwise + /** Returns true if field index_table is set (has been asigned a value) and false otherwise */ public boolean isSetIndex_table() { return this.index_table != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setIndex_tableIsSet(boolean value) { + if (!value) { + this.index_table = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NEW_INDEX: if (value == null) { unsetNew_index(); @@ -22903,34 +32531,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NEW_INDEX: return getNew_index(); case INDEX_TABLE: return getIndex_table(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NEW_INDEX: return isSetNew_index(); case INDEX_TABLE: return isSetIndex_table(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -22972,6 +32600,41 @@ public class ThriftHiveMetastore { return 0; } + public int compareTo(add_index_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_index_args typedOther = (add_index_args)other; + + lastComparison = Boolean.valueOf(isSetNew_index()).compareTo(typedOther.isSetNew_index()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNew_index()) { + lastComparison = TBaseHelper.compareTo(this.new_index, typedOther.new_index); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIndex_table()).compareTo(typedOther.isSetIndex_table()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIndex_table()) { + lastComparison = TBaseHelper.compareTo(this.index_table, typedOther.index_table); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22981,9 +32644,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NEW_INDEX: + switch (field.id) { + case 1: // NEW_INDEX if (field.type == TType.STRUCT) { this.new_index = new Index(); this.new_index.read(iprot); @@ -22991,7 +32653,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case INDEX_TABLE: + case 2: // INDEX_TABLE if (field.type == TType.STRUCT) { this.index_table = new Table(); this.index_table.read(iprot); @@ -23001,12 +32663,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -23054,43 +32714,104 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class add_index_result implements TBase, java.io.Serializable, Cloneable { + public static class add_index_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("add_index_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private static final TField O3_FIELD_DESC = new TField("o3", TType.STRUCT, (short)3); private Index success; - public static final int SUCCESS = 0; private InvalidObjectException o1; - public static final int O1 = 1; private AlreadyExistsException o2; - public static final int O2 = 2; private MetaException o3; - public static final int O3 = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + O1((short)1, "o1"), + O2((short)2, "o2"), + O3((short)3, "o3"); + + 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; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O3, new FieldMetaData("o3", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(add_index_result.class, metaDataMap); } @@ -23128,11 +32849,18 @@ public class ThriftHiveMetastore { } } - @Override - public add_index_result clone() { + public add_index_result deepCopy() { return new add_index_result(this); } + @Override + public void clear() { + this.success = null; + this.o1 = null; + this.o2 = null; + this.o3 = null; + } + public Index getSuccess() { return this.success; } @@ -23145,11 +32873,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public InvalidObjectException getO1() { return this.o1; } @@ -23162,11 +32896,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned a value) and false otherwise */ public boolean isSetO1() { return this.o1 != null; } + public void setO1IsSet(boolean value) { + if (!value) { + this.o1 = null; + } + } + public AlreadyExistsException getO2() { return this.o2; } @@ -23179,11 +32919,17 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned 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; } @@ -23196,13 +32942,19 @@ public class ThriftHiveMetastore { this.o3 = null; } - // Returns true if field o3 is set (has been asigned a value) and false otherwise + /** Returns true if field o3 is set (has been asigned a value) and false otherwise */ public boolean isSetO3() { return this.o3 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setO3IsSet(boolean value) { + if (!value) { + this.o3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -23235,13 +32987,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -23254,14 +33004,17 @@ public class ThriftHiveMetastore { case O3: return getO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -23270,9 +33023,8 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -23323,13 +33075,68 @@ public class ThriftHiveMetastore { if (!this.o3.equals(that.o3)) return false; } - - return true; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(add_index_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + add_index_result typedOther = (add_index_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = 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 = 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 = 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 = TBaseHelper.compareTo(this.o3, typedOther.o3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; } - @Override - public int hashCode() { - return 0; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { @@ -23341,9 +33148,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Index(); this.success.read(iprot); @@ -23351,7 +33157,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new InvalidObjectException(); this.o1.read(iprot); @@ -23359,7 +33165,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new AlreadyExistsException(); this.o2.read(iprot); @@ -23367,7 +33173,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O3: + case 3: // O3 if (field.type == TType.STRUCT) { this.o3 = new MetaException(); this.o3.read(iprot); @@ -23377,12 +33183,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -23452,44 +33256,106 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_index_by_name_args implements TBase, java.io.Serializable, Cloneable { + public static class drop_index_by_name_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); private static final TField DELETE_DATA_FIELD_DESC = new TField("deleteData", TType.BOOL, (short)4); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private String index_name; - public static final int INDEX_NAME = 3; private boolean deleteData; - public static final int DELETEDATA = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean deleteData = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DELETEDATA_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(DELETEDATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DELETE_DATA, new FieldMetaData("deleteData", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_index_by_name_args.class, metaDataMap); } @@ -23507,13 +33373,15 @@ public class ThriftHiveMetastore { this.tbl_name = tbl_name; this.index_name = index_name; this.deleteData = deleteData; - this.__isset.deleteData = true; + 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; } @@ -23523,15 +33391,22 @@ public class ThriftHiveMetastore { if (other.isSetIndex_name()) { this.index_name = other.index_name; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override - public drop_index_by_name_args clone() { + 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; } @@ -23544,11 +33419,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -23561,11 +33442,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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; } @@ -23578,31 +33465,41 @@ public class ThriftHiveMetastore { this.index_name = null; } - // Returns true if field index_name is set (has been asigned a value) and false otherwise + /** Returns true if field index_name is set (has been asigned 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; - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } public void unsetDeleteData() { - this.__isset.deleteData = false; + __isset_bit_vector.clear(__DELETEDATA_ISSET_ID); } - // Returns true if field deleteData is set (has been asigned a value) and false otherwise + /** Returns true if field deleteData is set (has been asigned a value) and false otherwise */ public boolean isSetDeleteData() { - return this.__isset.deleteData; + return __isset_bit_vector.get(__DELETEDATA_ISSET_ID); + } + + public void setDeleteDataIsSet(boolean value) { + __isset_bit_vector.set(__DELETEDATA_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -23627,7 +33524,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -23635,13 +33532,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -23651,28 +33546,30 @@ public class ThriftHiveMetastore { case INDEX_NAME: return getIndex_name(); - case DELETEDATA: + case DELETE_DATA: return new Boolean(isDeleteData()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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 DELETEDATA: + case DELETE_DATA: return isSetDeleteData(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -23732,6 +33629,61 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -23741,45 +33693,42 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case INDEX_NAME: + case 3: // INDEX_NAME if (field.type == TType.STRING) { this.index_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case DELETEDATA: + case 4: // DELETE_DATA if (field.type == TType.BOOL) { this.deleteData = iprot.readBool(); - this.__isset.deleteData = true; + setDeleteDataIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -23847,39 +33796,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class drop_index_by_name_result implements TBase, java.io.Serializable, Cloneable { + public static class drop_index_by_name_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("drop_index_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private boolean success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean success = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(drop_index_by_name_result.class, metaDataMap); } @@ -23893,7 +33902,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -23902,7 +33911,8 @@ public class ThriftHiveMetastore { * Performs a deep copy on other. */ public drop_index_by_name_result(drop_index_by_name_result other) { - __isset.success = other.__isset.success; + __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); @@ -23912,27 +33922,38 @@ public class ThriftHiveMetastore { } } - @Override - public drop_index_by_name_result clone() { + 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; - this.__isset.success = true; + setSuccessIsSet(true); } public void unsetSuccess() { - this.__isset.success = false; + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { - return this.__isset.success; + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); } public NoSuchObjectException getO1() { @@ -23947,11 +33968,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -23964,13 +33991,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -23995,13 +34028,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -24011,23 +34042,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -24078,6 +34111,51 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24087,17 +34165,16 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.BOOL) { this.success = iprot.readBool(); - this.__isset.success = true; + setSuccessIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -24105,7 +34182,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -24115,12 +34192,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24174,38 +34249,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_index_by_name_args implements TBase, java.io.Serializable, Cloneable { + public static class get_index_by_name_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField INDEX_NAME_FIELD_DESC = new TField("index_name", TType.STRING, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private String index_name; - public static final int INDEX_NAME = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.INDEX_NAME, new FieldMetaData("index_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_by_name_args.class, metaDataMap); } @@ -24238,11 +34372,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_index_by_name_args clone() { + 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; } @@ -24255,11 +34395,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -24272,11 +34418,17 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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; } @@ -24289,13 +34441,19 @@ public class ThriftHiveMetastore { this.index_name = null; } - // Returns true if field index_name is set (has been asigned a value) and false otherwise + /** Returns true if field index_name is set (has been asigned a value) and false otherwise */ public boolean isSetIndex_name() { return this.index_name != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -24320,13 +34478,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -24336,23 +34492,25 @@ public class ThriftHiveMetastore { case INDEX_NAME: return getIndex_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -24403,6 +34561,51 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24412,23 +34615,22 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case INDEX_NAME: + case 3: // INDEX_NAME if (field.type == TType.STRING) { this.index_name = iprot.readString(); } else { @@ -24437,12 +34639,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24503,38 +34703,97 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_index_by_name_result implements TBase, java.io.Serializable, Cloneable { + public static class get_index_by_name_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_by_name_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private Index success; - public static final int SUCCESS = 0; private MetaException o1; - public static final int O1 = 1; private NoSuchObjectException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Index.class))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_by_name_result.class, metaDataMap); } @@ -24567,11 +34826,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_index_by_name_result clone() { + 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; } @@ -24584,11 +34849,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -24601,11 +34872,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -24618,13 +34895,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -24649,13 +34932,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -24665,23 +34946,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -24723,13 +35006,58 @@ public class ThriftHiveMetastore { if (!this.o2.equals(that.o2)) return false; } - - return true; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + 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 = 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 = 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 = TBaseHelper.compareTo(this.o2, typedOther.o2); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; } - @Override - public int hashCode() { - return 0; + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); } public void read(TProtocol iprot) throws TException { @@ -24741,9 +35069,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new Index(); this.success.read(iprot); @@ -24751,7 +35078,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new MetaException(); this.o1.read(iprot); @@ -24759,7 +35086,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new NoSuchObjectException(); this.o2.read(iprot); @@ -24769,12 +35096,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24832,39 +35157,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_indexes_args implements TBase, java.io.Serializable, Cloneable { + public static class get_indexes_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_indexes_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private short max_indexes; - public static final int MAX_INDEXES = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_indexes = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_indexes_args.class, metaDataMap); } @@ -24882,28 +35267,36 @@ public class ThriftHiveMetastore { this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + 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; } - __isset.max_indexes = other.__isset.max_indexes; this.max_indexes = other.max_indexes; } - @Override - public get_indexes_args clone() { + 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; } @@ -24916,11 +35309,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -24933,31 +35332,41 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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; - this.__isset.max_indexes = true; + setMax_indexesIsSet(true); } public void unsetMax_indexes() { - this.__isset.max_indexes = false; + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); } - // Returns true if field max_indexes is set (has been asigned a value) and false otherwise + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return this.__isset.max_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(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -24982,13 +35391,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -24998,23 +35405,25 @@ public class ThriftHiveMetastore { case MAX_INDEXES: return new Short(getMax_indexes()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -25065,6 +35474,51 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25074,38 +35528,35 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_INDEXES: + case 3: // MAX_INDEXES if (field.type == TType.I16) { this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; + setMax_indexesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -25160,39 +35611,98 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_indexes_result implements TBase, java.io.Serializable, Cloneable { + public static class get_indexes_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_indexes_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O1_FIELD_DESC = new TField("o1", TType.STRUCT, (short)1); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)2); private List success; - public static final int SUCCESS = 0; private NoSuchObjectException o1; - public static final int O1 = 1; private MetaException o2; - public static final int O2 = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Index.class)))); - put(O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O1, new FieldMetaData("o1", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_indexes_result.class, metaDataMap); } @@ -25229,11 +35739,17 @@ public class ThriftHiveMetastore { } } - @Override - public get_indexes_result clone() { + 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(); } @@ -25261,11 +35777,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -25278,11 +35800,17 @@ public class ThriftHiveMetastore { this.o1 = null; } - // Returns true if field o1 is set (has been asigned a value) and false otherwise + /** Returns true if field o1 is set (has been asigned 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; } @@ -25295,13 +35823,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -25326,13 +35860,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -25342,23 +35874,25 @@ public class ThriftHiveMetastore { case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -25409,6 +35943,51 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25418,9 +35997,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list136 = iprot.readListBegin(); @@ -25438,7 +36016,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O1: + case 1: // O1 if (field.type == TType.STRUCT) { this.o1 = new NoSuchObjectException(); this.o1.read(iprot); @@ -25446,7 +36024,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 2: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -25456,12 +36034,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -25472,7 +36048,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.success.size())); - for (Index _iter139 : this.success) { + for (Index _iter139 : this.success) + { _iter139.write(oprot); } oprot.writeListEnd(); @@ -25525,39 +36102,99 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_index_names_args implements TBase, java.io.Serializable, Cloneable { + public static class get_index_names_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_names_args"); + private static final TField DB_NAME_FIELD_DESC = new TField("db_name", TType.STRING, (short)1); private static final TField TBL_NAME_FIELD_DESC = new TField("tbl_name", TType.STRING, (short)2); private static final TField MAX_INDEXES_FIELD_DESC = new TField("max_indexes", TType.I16, (short)3); private String db_name; - public static final int DB_NAME = 1; private String tbl_name; - public static final int TBL_NAME = 2; private short max_indexes; - public static final int MAX_INDEXES = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean max_indexes = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, + // 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, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.DB_NAME, new FieldMetaData("db_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TBL_NAME, new FieldMetaData("tbl_name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_INDEXES, new FieldMetaData("max_indexes", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I16))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_names_args.class, metaDataMap); } @@ -25575,28 +36212,36 @@ public class ThriftHiveMetastore { this.db_name = db_name; this.tbl_name = tbl_name; this.max_indexes = max_indexes; - this.__isset.max_indexes = true; + 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; } - __isset.max_indexes = other.__isset.max_indexes; this.max_indexes = other.max_indexes; } - @Override - public get_index_names_args clone() { + 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; } @@ -25609,11 +36254,17 @@ public class ThriftHiveMetastore { this.db_name = null; } - // Returns true if field db_name is set (has been asigned a value) and false otherwise + /** Returns true if field db_name is set (has been asigned 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; } @@ -25626,31 +36277,41 @@ public class ThriftHiveMetastore { this.tbl_name = null; } - // Returns true if field tbl_name is set (has been asigned a value) and false otherwise + /** Returns true if field tbl_name is set (has been asigned 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; - this.__isset.max_indexes = true; + setMax_indexesIsSet(true); } public void unsetMax_indexes() { - this.__isset.max_indexes = false; + __isset_bit_vector.clear(__MAX_INDEXES_ISSET_ID); } - // Returns true if field max_indexes is set (has been asigned a value) and false otherwise + /** Returns true if field max_indexes is set (has been asigned a value) and false otherwise */ public boolean isSetMax_indexes() { - return this.__isset.max_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(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -25675,13 +36336,11 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -25691,23 +36350,25 @@ public class ThriftHiveMetastore { case MAX_INDEXES: return new Short(getMax_indexes()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -25758,6 +36419,51 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25767,38 +36473,35 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case DB_NAME: + switch (field.id) { + case 1: // DB_NAME if (field.type == TType.STRING) { this.db_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TBL_NAME: + case 2: // TBL_NAME if (field.type == TType.STRING) { this.tbl_name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAX_INDEXES: + case 3: // MAX_INDEXES if (field.type == TType.I16) { this.max_indexes = iprot.readI16(); - this.__isset.max_indexes = true; + setMax_indexesIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -25853,34 +36556,91 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class get_index_names_result implements TBase, java.io.Serializable, Cloneable { + public static class get_index_names_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("get_index_names_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField O2_FIELD_DESC = new TField("o2", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private MetaException o2; - public static final int O2 = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.O2, new FieldMetaData("o2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(get_index_names_result.class, metaDataMap); } @@ -25912,11 +36672,16 @@ public class ThriftHiveMetastore { } } - @Override - public get_index_names_result clone() { + 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(); } @@ -25944,11 +36709,17 @@ public class ThriftHiveMetastore { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned 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; } @@ -25961,13 +36732,19 @@ public class ThriftHiveMetastore { this.o2 = null; } - // Returns true if field o2 is set (has been asigned a value) and false otherwise + /** Returns true if field o2 is set (has been asigned a value) and false otherwise */ public boolean isSetO2() { return this.o2 != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -25984,34 +36761,34 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case O2: return getO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned 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(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -26053,6 +36830,41 @@ public class ThriftHiveMetastore { return 0; } + 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 = 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 = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -26062,9 +36874,8 @@ public class ThriftHiveMetastore { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list140 = iprot.readListBegin(); @@ -26081,7 +36892,7 @@ public class ThriftHiveMetastore { TProtocolUtil.skip(iprot, field.type); } break; - case O2: + case 1: // O2 if (field.type == TType.STRUCT) { this.o2 = new MetaException(); this.o2.read(iprot); @@ -26091,12 +36902,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -26107,7 +36916,8 @@ public class ThriftHiveMetastore { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter143 : this.success) { + for (String _iter143 : this.success) + { oprot.writeString(_iter143); } oprot.writeListEnd(); @@ -26148,7 +36958,6 @@ public class ThriftHiveMetastore { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java index 3a49472..26d684a 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java @@ -9,48 +9,118 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Type implements TBase, java.io.Serializable, Cloneable { +public class Type implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Type"); + private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1); private static final TField TYPE1_FIELD_DESC = new TField("type1", TType.STRING, (short)2); private static final TField TYPE2_FIELD_DESC = new TField("type2", TType.STRING, (short)3); private static final TField FIELDS_FIELD_DESC = new TField("fields", TType.LIST, (short)4); private String name; - public static final int NAME = 1; private String type1; - public static final int TYPE1 = 2; private String type2; - public static final int TYPE2 = 3; private List fields; - public static final int FIELDS = 4; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NAME((short)1, "name"), + TYPE1((short)2, "type1"), + TYPE2((short)3, "type2"), + FIELDS((short)4, "fields"); + + 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: // NAME + return NAME; + case 2: // TYPE1 + return TYPE1; + case 3: // TYPE2 + return TYPE2; + case 4: // FIELDS + return FIELDS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TYPE1, new FieldMetaData("type1", TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.TYPE1, new FieldMetaData("type1", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); - put(TYPE2, new FieldMetaData("type2", TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.TYPE2, new FieldMetaData("type2", TFieldRequirementType.OPTIONAL, new FieldValueMetaData(TType.STRING))); - put(FIELDS, new FieldMetaData("fields", TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.FIELDS, new FieldMetaData("fields", TFieldRequirementType.OPTIONAL, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, FieldSchema.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Type.class, metaDataMap); } @@ -58,16 +128,10 @@ public class Type implements TBase, java.io.Serializable, Cloneable { } public Type( - String name, - String type1, - String type2, - List fields) + String name) { this(); this.name = name; - this.type1 = type1; - this.type2 = type2; - this.fields = fields; } /** @@ -92,11 +156,18 @@ public class Type implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Type clone() { + public Type deepCopy() { return new Type(this); } + @Override + public void clear() { + this.name = null; + this.type1 = null; + this.type2 = null; + this.fields = null; + } + public String getName() { return this.name; } @@ -109,11 +180,17 @@ public class Type implements TBase, java.io.Serializable, Cloneable { this.name = null; } - // Returns true if field name is set (has been asigned a value) and false otherwise + /** Returns true if field name is set (has been asigned a value) and false otherwise */ public boolean isSetName() { return this.name != null; } + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + public String getType1() { return this.type1; } @@ -126,11 +203,17 @@ public class Type implements TBase, java.io.Serializable, Cloneable { this.type1 = null; } - // Returns true if field type1 is set (has been asigned a value) and false otherwise + /** Returns true if field type1 is set (has been asigned a value) and false otherwise */ public boolean isSetType1() { return this.type1 != null; } + public void setType1IsSet(boolean value) { + if (!value) { + this.type1 = null; + } + } + public String getType2() { return this.type2; } @@ -143,11 +226,17 @@ public class Type implements TBase, java.io.Serializable, Cloneable { this.type2 = null; } - // Returns true if field type2 is set (has been asigned a value) and false otherwise + /** Returns true if field type2 is set (has been asigned a value) and false otherwise */ public boolean isSetType2() { return this.type2 != null; } + public void setType2IsSet(boolean value) { + if (!value) { + this.type2 = null; + } + } + public int getFieldsSize() { return (this.fields == null) ? 0 : this.fields.size(); } @@ -175,13 +264,19 @@ public class Type implements TBase, java.io.Serializable, Cloneable { this.fields = null; } - // Returns true if field fields is set (has been asigned a value) and false otherwise + /** Returns true if field fields is set (has been asigned a value) and false otherwise */ public boolean isSetFields() { return this.fields != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldsIsSet(boolean value) { + if (!value) { + this.fields = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NAME: if (value == null) { unsetName(); @@ -214,13 +309,11 @@ public class Type implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); @@ -233,14 +326,17 @@ public class Type implements TBase, java.io.Serializable, Cloneable { case FIELDS: return getFields(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NAME: return isSetName(); case TYPE1: @@ -249,9 +345,8 @@ public class Type implements TBase, java.io.Serializable, Cloneable { return isSetType2(); case FIELDS: return isSetFields(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -311,6 +406,61 @@ public class Type implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Type other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Type typedOther = (Type)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType1()).compareTo(typedOther.isSetType1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType1()) { + lastComparison = TBaseHelper.compareTo(this.type1, typedOther.type1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetType2()).compareTo(typedOther.isSetType2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetType2()) { + lastComparison = TBaseHelper.compareTo(this.type2, typedOther.type2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFields()).compareTo(typedOther.isSetFields()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFields()) { + lastComparison = TBaseHelper.compareTo(this.fields, typedOther.fields); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -320,30 +470,29 @@ public class Type implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NAME: + switch (field.id) { + case 1: // NAME if (field.type == TType.STRING) { this.name = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TYPE1: + case 2: // TYPE1 if (field.type == TType.STRING) { this.type1 = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TYPE2: + case 3: // TYPE2 if (field.type == TType.STRING) { this.type2 = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case FIELDS: + case 4: // FIELDS if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); @@ -363,12 +512,10 @@ public class Type implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -400,7 +547,8 @@ public class Type implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(FIELDS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.fields.size())); - for (FieldSchema _iter3 : this.fields) { + for (FieldSchema _iter3 : this.fields) + { _iter3.write(oprot); } oprot.writeListEnd(); @@ -460,7 +608,6 @@ public class Type implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java index ed666e7..3422215 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class UnknownDBException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class UnknownDBException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("UnknownDBException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(UnknownDBException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri } } - @Override - public UnknownDBException clone() { + public UnknownDBException deepCopy() { return new UnknownDBException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri return 0; } + public int compareTo(UnknownDBException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + UnknownDBException typedOther = (UnknownDBException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java index fe10e4a..4d39921 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java @@ -9,32 +9,96 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class UnknownTableException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class UnknownTableException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("UnknownTableException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private String message; - public static final int MESSAGE = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(UnknownTableException.class, metaDataMap); } @@ -57,11 +121,15 @@ public class UnknownTableException extends Exception implements TBase, java.io.S } } - @Override - public UnknownTableException clone() { + public UnknownTableException deepCopy() { return new UnknownTableException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +142,19 @@ public class UnknownTableException extends Exception implements TBase, java.io.S this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + 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(); @@ -89,29 +163,29 @@ public class UnknownTableException extends Exception implements TBase, java.io.S } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -144,6 +218,31 @@ public class UnknownTableException extends Exception implements TBase, java.io.S return 0; } + public int compareTo(UnknownTableException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + UnknownTableException typedOther = (UnknownTableException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = 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(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +252,8 @@ public class UnknownTableException extends Exception implements TBase, java.io.S if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { @@ -164,12 +262,10 @@ public class UnknownTableException extends Exception implements TBase, java.io.S break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +300,6 @@ public class UnknownTableException extends Exception implements TBase, java.io.S public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java index 6e61224..8955d07 100644 --- metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java +++ metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java @@ -9,37 +9,103 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Version implements TBase, java.io.Serializable, Cloneable { +public class Version implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Version"); + private static final TField VERSION_FIELD_DESC = new TField("version", TType.STRING, (short)1); private static final TField COMMENTS_FIELD_DESC = new TField("comments", TType.STRING, (short)2); private String version; - public static final int VERSION = 1; private String comments; - public static final int COMMENTS = 2; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + VERSION((short)1, "version"), + COMMENTS((short)2, "comments"); + + 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: // VERSION + return VERSION; + case 2: // COMMENTS + return COMMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.COMMENTS, new FieldMetaData("comments", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Version.class, metaDataMap); } @@ -67,11 +133,16 @@ public class Version implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Version clone() { + public Version deepCopy() { return new Version(this); } + @Override + public void clear() { + this.version = null; + this.comments = null; + } + public String getVersion() { return this.version; } @@ -84,11 +155,17 @@ public class Version implements TBase, java.io.Serializable, Cloneable { this.version = null; } - // Returns true if field version is set (has been asigned a value) and false otherwise + /** Returns true if field version is set (has been asigned a value) and false otherwise */ public boolean isSetVersion() { return this.version != null; } + public void setVersionIsSet(boolean value) { + if (!value) { + this.version = null; + } + } + public String getComments() { return this.comments; } @@ -101,13 +178,19 @@ public class Version implements TBase, java.io.Serializable, Cloneable { this.comments = null; } - // Returns true if field comments is set (has been asigned a value) and false otherwise + /** Returns true if field comments is set (has been asigned a value) and false otherwise */ public boolean isSetComments() { return this.comments != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setCommentsIsSet(boolean value) { + if (!value) { + this.comments = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case VERSION: if (value == null) { unsetVersion(); @@ -124,34 +207,34 @@ public class Version implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case VERSION: return getVersion(); case COMMENTS: return getComments(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case VERSION: return isSetVersion(); case COMMENTS: return isSetComments(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -193,6 +276,41 @@ public class Version implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Version other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Version typedOther = (Version)other; + + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(typedOther.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = TBaseHelper.compareTo(this.version, typedOther.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetComments()).compareTo(typedOther.isSetComments()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetComments()) { + lastComparison = TBaseHelper.compareTo(this.comments, typedOther.comments); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -202,16 +320,15 @@ public class Version implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case VERSION: + switch (field.id) { + case 1: // VERSION if (field.type == TType.STRING) { this.version = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case COMMENTS: + case 2: // COMMENTS if (field.type == TType.STRING) { this.comments = iprot.readString(); } else { @@ -220,12 +337,10 @@ public class Version implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -273,7 +388,6 @@ public class Version implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git metastore/src/gen-php/ThriftHiveMetastore.php metastore/src/gen-php/ThriftHiveMetastore.php deleted file mode 100644 index ef972ef..0000000 --- metastore/src/gen-php/ThriftHiveMetastore.php +++ /dev/null @@ -1,10881 +0,0 @@ -send_create_database($database); - $this->recv_create_database(); - } - - public function send_create_database($database) - { - $args = new metastore_ThriftHiveMetastore_create_database_args(); - $args->database = $database; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'create_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('create_database', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_create_database() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_database_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 metastore_ThriftHiveMetastore_create_database_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - return; - } - - public function get_database($name) - { - $this->send_get_database($name); - return $this->recv_get_database(); - } - - public function send_get_database($name) - { - $args = new metastore_ThriftHiveMetastore_get_database_args(); - $args->name = $name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_database', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_database() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_database_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 metastore_ThriftHiveMetastore_get_database_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_database failed: unknown result"); - } - - public function drop_database($name, $deleteData) - { - $this->send_drop_database($name, $deleteData); - $this->recv_drop_database(); - } - - public function send_drop_database($name, $deleteData) - { - $args = new metastore_ThriftHiveMetastore_drop_database_args(); - $args->name = $name; - $args->deleteData = $deleteData; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_database', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_database() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_database_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 metastore_ThriftHiveMetastore_drop_database_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - return; - } - - public function get_databases($pattern) - { - $this->send_get_databases($pattern); - return $this->recv_get_databases(); - } - - public function send_get_databases($pattern) - { - $args = new metastore_ThriftHiveMetastore_get_databases_args(); - $args->pattern = $pattern; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_databases', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_databases() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_databases_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 metastore_ThriftHiveMetastore_get_databases_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_databases failed: unknown result"); - } - - public function get_all_databases() - { - $this->send_get_all_databases(); - return $this->recv_get_all_databases(); - } - - public function send_get_all_databases() - { - $args = new metastore_ThriftHiveMetastore_get_all_databases_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_all_databases() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_databases_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 metastore_ThriftHiveMetastore_get_all_databases_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_all_databases failed: unknown result"); - } - - public function get_type($name) - { - $this->send_get_type($name); - return $this->recv_get_type(); - } - - public function send_get_type($name) - { - $args = new metastore_ThriftHiveMetastore_get_type_args(); - $args->name = $name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_type', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_type() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_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 metastore_ThriftHiveMetastore_get_type_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_type failed: unknown result"); - } - - public function create_type($type) - { - $this->send_create_type($type); - return $this->recv_create_type(); - } - - public function send_create_type($type) - { - $args = new metastore_ThriftHiveMetastore_create_type_args(); - $args->type = $type; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'create_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('create_type', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_create_type() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_type_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 metastore_ThriftHiveMetastore_create_type_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("create_type failed: unknown result"); - } - - public function drop_type($type) - { - $this->send_drop_type($type); - return $this->recv_drop_type(); - } - - public function send_drop_type($type) - { - $args = new metastore_ThriftHiveMetastore_drop_type_args(); - $args->type = $type; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_type', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_type() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_type_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 metastore_ThriftHiveMetastore_drop_type_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("drop_type failed: unknown result"); - } - - public function get_type_all($name) - { - $this->send_get_type_all($name); - return $this->recv_get_type_all(); - } - - public function send_get_type_all($name) - { - $args = new metastore_ThriftHiveMetastore_get_type_all_args(); - $args->name = $name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_type_all', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_type_all', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_type_all() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_all_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 metastore_ThriftHiveMetastore_get_type_all_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_type_all failed: unknown result"); - } - - public function get_fields($db_name, $table_name) - { - $this->send_get_fields($db_name, $table_name); - return $this->recv_get_fields(); - } - - public function send_get_fields($db_name, $table_name) - { - $args = new metastore_ThriftHiveMetastore_get_fields_args(); - $args->db_name = $db_name; - $args->table_name = $table_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_fields', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_fields', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_fields() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_fields_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 metastore_ThriftHiveMetastore_get_fields_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("get_fields failed: unknown result"); - } - - public function get_schema($db_name, $table_name) - { - $this->send_get_schema($db_name, $table_name); - return $this->recv_get_schema(); - } - - public function send_get_schema($db_name, $table_name) - { - $args = new metastore_ThriftHiveMetastore_get_schema_args(); - $args->db_name = $db_name; - $args->table_name = $table_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_schema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_schema', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_schema() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_schema_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 metastore_ThriftHiveMetastore_get_schema_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("get_schema failed: unknown result"); - } - - public function create_table($tbl) - { - $this->send_create_table($tbl); - $this->recv_create_table(); - } - - public function send_create_table($tbl) - { - $args = new metastore_ThriftHiveMetastore_create_table_args(); - $args->tbl = $tbl; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'create_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('create_table', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_create_table() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_table_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 metastore_ThriftHiveMetastore_create_table_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - 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; - } - return; - } - - public function drop_table($dbname, $name, $deleteData) - { - $this->send_drop_table($dbname, $name, $deleteData); - $this->recv_drop_table(); - } - - public function send_drop_table($dbname, $name, $deleteData) - { - $args = new metastore_ThriftHiveMetastore_drop_table_args(); - $args->dbname = $dbname; - $args->name = $name; - $args->deleteData = $deleteData; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_table', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_table() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_table_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 metastore_ThriftHiveMetastore_drop_table_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o3 !== null) { - throw $result->o3; - } - return; - } - - public function get_tables($db_name, $pattern) - { - $this->send_get_tables($db_name, $pattern); - return $this->recv_get_tables(); - } - - public function send_get_tables($db_name, $pattern) - { - $args = new metastore_ThriftHiveMetastore_get_tables_args(); - $args->db_name = $db_name; - $args->pattern = $pattern; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_tables', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_tables() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_tables_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 metastore_ThriftHiveMetastore_get_tables_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_tables failed: unknown result"); - } - - public function get_all_tables($db_name) - { - $this->send_get_all_tables($db_name); - return $this->recv_get_all_tables(); - } - - public function send_get_all_tables($db_name) - { - $args = new metastore_ThriftHiveMetastore_get_all_tables_args(); - $args->db_name = $db_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_all_tables() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_tables_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 metastore_ThriftHiveMetastore_get_all_tables_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_all_tables failed: unknown result"); - } - - public function get_table($dbname, $tbl_name) - { - $this->send_get_table($dbname, $tbl_name); - return $this->recv_get_table(); - } - - public function send_get_table($dbname, $tbl_name) - { - $args = new metastore_ThriftHiveMetastore_get_table_args(); - $args->dbname = $dbname; - $args->tbl_name = $tbl_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_table', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_table() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_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 metastore_ThriftHiveMetastore_get_table_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_table failed: unknown result"); - } - - public function alter_table($dbname, $tbl_name, $new_tbl) - { - $this->send_alter_table($dbname, $tbl_name, $new_tbl); - $this->recv_alter_table(); - } - - public function send_alter_table($dbname, $tbl_name, $new_tbl) - { - $args = new metastore_ThriftHiveMetastore_alter_table_args(); - $args->dbname = $dbname; - $args->tbl_name = $tbl_name; - $args->new_tbl = $new_tbl; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_table', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_table() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_table_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 metastore_ThriftHiveMetastore_alter_table_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - return; - } - - public function add_partition($new_part) - { - $this->send_add_partition($new_part); - return $this->recv_add_partition(); - } - - public function send_add_partition($new_part) - { - $args = new metastore_ThriftHiveMetastore_add_partition_args(); - $args->new_part = $new_part; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_partition() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_partition_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 metastore_ThriftHiveMetastore_add_partition_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("add_partition failed: unknown result"); - } - - public function append_partition($db_name, $tbl_name, $part_vals) - { - $this->send_append_partition($db_name, $tbl_name, $part_vals); - return $this->recv_append_partition(); - } - - public function send_append_partition($db_name, $tbl_name, $part_vals) - { - $args = new metastore_ThriftHiveMetastore_append_partition_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'append_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('append_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_append_partition() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_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 metastore_ThriftHiveMetastore_append_partition_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("append_partition failed: unknown result"); - } - - public function append_partition_by_name($db_name, $tbl_name, $part_name) - { - $this->send_append_partition_by_name($db_name, $tbl_name, $part_name); - return $this->recv_append_partition_by_name(); - } - - public function send_append_partition_by_name($db_name, $tbl_name, $part_name) - { - $args = new metastore_ThriftHiveMetastore_append_partition_by_name_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'append_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('append_partition_by_name', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_append_partition_by_name() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_by_name_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 metastore_ThriftHiveMetastore_append_partition_by_name_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("append_partition_by_name failed: unknown result"); - } - - public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData) - { - $this->send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData); - return $this->recv_drop_partition(); - } - - public function send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData) - { - $args = new metastore_ThriftHiveMetastore_drop_partition_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $args->deleteData = $deleteData; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_partition() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_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 metastore_ThriftHiveMetastore_drop_partition_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("drop_partition failed: unknown result"); - } - - public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) - { - $this->send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); - return $this->recv_drop_partition_by_name(); - } - - public function send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) - { - $args = new metastore_ThriftHiveMetastore_drop_partition_by_name_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $args->deleteData = $deleteData; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_partition_by_name', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_partition_by_name() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_by_name_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 metastore_ThriftHiveMetastore_drop_partition_by_name_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("drop_partition_by_name failed: unknown result"); - } - - public function get_partition($db_name, $tbl_name, $part_vals) - { - $this->send_get_partition($db_name, $tbl_name, $part_vals); - return $this->recv_get_partition(); - } - - public function send_get_partition($db_name, $tbl_name, $part_vals) - { - $args = new metastore_ThriftHiveMetastore_get_partition_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partition() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_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 metastore_ThriftHiveMetastore_get_partition_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_partition failed: unknown result"); - } - - public function get_partition_by_name($db_name, $tbl_name, $part_name) - { - $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); - return $this->recv_get_partition_by_name(); - } - - public function send_get_partition_by_name($db_name, $tbl_name, $part_name) - { - $args = new metastore_ThriftHiveMetastore_get_partition_by_name_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_name = $part_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partition_by_name', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partition_by_name() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_by_name_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 metastore_ThriftHiveMetastore_get_partition_by_name_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_partition_by_name failed: unknown result"); - } - - public function get_partitions($db_name, $tbl_name, $max_parts) - { - $this->send_get_partitions($db_name, $tbl_name, $max_parts); - return $this->recv_get_partitions(); - } - - public function send_get_partitions($db_name, $tbl_name, $max_parts) - { - $args = new metastore_ThriftHiveMetastore_get_partitions_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_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 metastore_ThriftHiveMetastore_get_partitions_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_partitions failed: unknown result"); - } - - public function get_partition_names($db_name, $tbl_name, $max_parts) - { - $this->send_get_partition_names($db_name, $tbl_name, $max_parts); - return $this->recv_get_partition_names(); - } - - public function send_get_partition_names($db_name, $tbl_name, $max_parts) - { - $args = new metastore_ThriftHiveMetastore_get_partition_names_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partition_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partition_names', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partition_names() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_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 metastore_ThriftHiveMetastore_get_partition_names_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_partition_names failed: unknown result"); - } - - public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) - { - $this->send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); - return $this->recv_get_partitions_ps(); - } - - public function send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) - { - $args = new metastore_ThriftHiveMetastore_get_partitions_ps_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions_ps', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions_ps() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_ps_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 metastore_ThriftHiveMetastore_get_partitions_ps_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_partitions_ps failed: unknown result"); - } - - public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) - { - $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); - return $this->recv_get_partition_names_ps(); - } - - public function send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) - { - $args = new metastore_ThriftHiveMetastore_get_partition_names_ps_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->part_vals = $part_vals; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partition_names_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partition_names_ps', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partition_names_ps() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_ps_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 metastore_ThriftHiveMetastore_get_partition_names_ps_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_partition_names_ps failed: unknown result"); - } - - public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) - { - $this->send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); - return $this->recv_get_partitions_by_filter(); - } - - public function send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) - { - $args = new metastore_ThriftHiveMetastore_get_partitions_by_filter_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->filter = $filter; - $args->max_parts = $max_parts; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_partitions_by_filter', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_partitions_by_filter() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_by_filter_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 metastore_ThriftHiveMetastore_get_partitions_by_filter_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_partitions_by_filter failed: unknown result"); - } - - public function alter_partition($db_name, $tbl_name, $new_part) - { - $this->send_alter_partition($db_name, $tbl_name, $new_part); - $this->recv_alter_partition(); - } - - public function send_alter_partition($db_name, $tbl_name, $new_part) - { - $args = new metastore_ThriftHiveMetastore_alter_partition_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->new_part = $new_part; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'alter_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('alter_partition', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_alter_partition() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_partition_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 metastore_ThriftHiveMetastore_alter_partition_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - return; - } - - public function get_config_value($name, $defaultValue) - { - $this->send_get_config_value($name, $defaultValue); - return $this->recv_get_config_value(); - } - - public function send_get_config_value($name, $defaultValue) - { - $args = new metastore_ThriftHiveMetastore_get_config_value_args(); - $args->name = $name; - $args->defaultValue = $defaultValue; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_config_value', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_config_value', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_config_value() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_config_value_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 metastore_ThriftHiveMetastore_get_config_value_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_config_value failed: unknown result"); - } - - public function partition_name_to_vals($part_name) - { - $this->send_partition_name_to_vals($part_name); - return $this->recv_partition_name_to_vals(); - } - - public function send_partition_name_to_vals($part_name) - { - $args = new metastore_ThriftHiveMetastore_partition_name_to_vals_args(); - $args->part_name = $part_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'partition_name_to_vals', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('partition_name_to_vals', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_partition_name_to_vals() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_vals_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 metastore_ThriftHiveMetastore_partition_name_to_vals_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("partition_name_to_vals failed: unknown result"); - } - - public function partition_name_to_spec($part_name) - { - $this->send_partition_name_to_spec($part_name); - return $this->recv_partition_name_to_spec(); - } - - public function send_partition_name_to_spec($part_name) - { - $args = new metastore_ThriftHiveMetastore_partition_name_to_spec_args(); - $args->part_name = $part_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'partition_name_to_spec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('partition_name_to_spec', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_partition_name_to_spec() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_spec_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 metastore_ThriftHiveMetastore_partition_name_to_spec_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("partition_name_to_spec failed: unknown result"); - } - - public function add_index($new_index, $index_table) - { - $this->send_add_index($new_index, $index_table); - return $this->recv_add_index(); - } - - public function send_add_index($new_index, $index_table) - { - $args = new metastore_ThriftHiveMetastore_add_index_args(); - $args->new_index = $new_index; - $args->index_table = $index_table; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'add_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('add_index', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_add_index() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_index_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 metastore_ThriftHiveMetastore_add_index_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - if ($result->o3 !== null) { - throw $result->o3; - } - throw new Exception("add_index failed: unknown result"); - } - - public function drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) - { - $this->send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData); - return $this->recv_drop_index_by_name(); - } - - public function send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) - { - $args = new metastore_ThriftHiveMetastore_drop_index_by_name_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->index_name = $index_name; - $args->deleteData = $deleteData; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'drop_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('drop_index_by_name', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_drop_index_by_name() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_index_by_name_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 metastore_ThriftHiveMetastore_drop_index_by_name_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("drop_index_by_name failed: unknown result"); - } - - public function get_index_by_name($db_name, $tbl_name, $index_name) - { - $this->send_get_index_by_name($db_name, $tbl_name, $index_name); - return $this->recv_get_index_by_name(); - } - - public function send_get_index_by_name($db_name, $tbl_name, $index_name) - { - $args = new metastore_ThriftHiveMetastore_get_index_by_name_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->index_name = $index_name; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_index_by_name', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_index_by_name() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_index_by_name_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 metastore_ThriftHiveMetastore_get_index_by_name_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_index_by_name failed: unknown result"); - } - - public function get_indexes($db_name, $tbl_name, $max_indexes) - { - $this->send_get_indexes($db_name, $tbl_name, $max_indexes); - return $this->recv_get_indexes(); - } - - public function send_get_indexes($db_name, $tbl_name, $max_indexes) - { - $args = new metastore_ThriftHiveMetastore_get_indexes_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->max_indexes = $max_indexes; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_indexes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_indexes', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_indexes() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_indexes_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 metastore_ThriftHiveMetastore_get_indexes_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o1 !== null) { - throw $result->o1; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_indexes failed: unknown result"); - } - - public function get_index_names($db_name, $tbl_name, $max_indexes) - { - $this->send_get_index_names($db_name, $tbl_name, $max_indexes); - return $this->recv_get_index_names(); - } - - public function send_get_index_names($db_name, $tbl_name, $max_indexes) - { - $args = new metastore_ThriftHiveMetastore_get_index_names_args(); - $args->db_name = $db_name; - $args->tbl_name = $tbl_name; - $args->max_indexes = $max_indexes; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'get_index_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('get_index_names', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_get_index_names() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_index_names_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 metastore_ThriftHiveMetastore_get_index_names_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->o2 !== null) { - throw $result->o2; - } - throw new Exception("get_index_names failed: unknown result"); - } - -} - -// HELPER FUNCTIONS AND STRUCTURES - -class metastore_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' => 'metastore_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 metastore_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 metastore_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' => 'metastore_AlreadyExistsException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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 metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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 metastore_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 metastore_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' => 'metastore_Database', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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 metastore_Database(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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 metastore_ThriftHiveMetastore_drop_database_args { - static $_TSPEC; - - public $name = null; - public $deleteData = 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, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - } - } - - 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; - 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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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 metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidOperationException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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 metastore_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 metastore_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' => 'metastore_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(); - $_size103 = 0; - $_etype106 = 0; - $xfer += $input->readListBegin($_etype106, $_size103); - for ($_i107 = 0; $_i107 < $_size103; ++$_i107) - { - $elem108 = null; - $xfer += $input->readString($elem108); - $this->success []= $elem108; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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 $iter109) - { - $xfer += $output->writeString($iter109); - } - } - $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 metastore_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 metastore_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' => 'metastore_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(); - $_size110 = 0; - $_etype113 = 0; - $xfer += $input->readListBegin($_etype113, $_size110); - for ($_i114 = 0; $_i114 < $_size110; ++$_i114) - { - $elem115 = null; - $xfer += $input->readString($elem115); - $this->success []= $elem115; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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 $iter116) - { - $xfer += $output->writeString($iter116); - } - } - $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 metastore_ThriftHiveMetastore_get_type_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_type_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_type_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 metastore_ThriftHiveMetastore_get_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::STRUCT, - 'class' => 'metastore_Type', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_type_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 metastore_Type(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_type_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $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 metastore_ThriftHiveMetastore_create_type_args { - static $_TSPEC; - - public $type = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'type', - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_create_type_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->type = new metastore_Type(); - $xfer += $this->type->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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_create_type_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_create_type_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::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_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); - $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 metastore_ThriftHiveMetastore_drop_type_args { - static $_TSPEC; - - public $type = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_type_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->type); - } 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_type_args'); - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 1); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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::BOOL, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_type_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::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_drop_type_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $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 metastore_ThriftHiveMetastore_get_type_all_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_type_all_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_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; - } - -} - -class metastore_ThriftHiveMetastore_get_type_all_result { - static $_TSPEC; - - public $success = 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::STRUCT, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Type', - ), - ), - 1 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_type_all_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::MAP) { - $this->success = array(); - $_size117 = 0; - $_ktype118 = 0; - $_vtype119 = 0; - $xfer += $input->readMapBegin($_ktype118, $_vtype119, $_size117); - for ($_i121 = 0; $_i121 < $_size117; ++$_i121) - { - $key122 = ''; - $val123 = new metastore_Type(); - $xfer += $input->readString($key122); - $val123 = new metastore_Type(); - $xfer += $val123->read($input); - $this->success[$key122] = $val123; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_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 $kiter124 => $viter125) - { - $xfer += $output->writeString($kiter124); - $xfer += $viter125->write($output); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_fields_args { - static $_TSPEC; - - public $db_name = null; - public $table_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' => 'table_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['table_name'])) { - $this->table_name = $vals['table_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_fields_args'; - } - - 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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->table_name !== null) { - $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); - $xfer += $output->writeString($this->table_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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' => 'metastore_FieldSchema', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_get_fields_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(); - $_size126 = 0; - $_etype129 = 0; - $xfer += $input->readListBegin($_etype129, $_size126); - for ($_i130 = 0; $_i130 < $_size126; ++$_i130) - { - $elem131 = null; - $elem131 = new metastore_FieldSchema(); - $xfer += $elem131->read($input); - $this->success []= $elem131; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $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_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 $iter132) - { - $xfer += $iter132->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, 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 metastore_ThriftHiveMetastore_get_schema_args { - static $_TSPEC; - - public $db_name = null; - public $table_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' => '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'; - } - - 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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->table_name); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->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; - } - -} - -class metastore_ThriftHiveMetastore_get_schema_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_UnknownTableException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_get_schema_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(); - $_size133 = 0; - $_etype136 = 0; - $xfer += $input->readListBegin($_etype136, $_size133); - for ($_i137 = 0; $_i137 < $_size133; ++$_i137) - { - $elem138 = null; - $elem138 = new metastore_FieldSchema(); - $xfer += $elem138->read($input); - $this->success []= $elem138; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_UnknownTableException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_UnknownDBException(); - $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_get_schema_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter139) - { - $xfer += $iter139->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, 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 metastore_ThriftHiveMetastore_create_table_args { - static $_TSPEC; - - public $tbl = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tbl', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tbl'])) { - $this->tbl = $vals['tbl']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_create_table_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->tbl = new metastore_Table(); - $xfer += $this->tbl->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_table_args'); - if ($this->tbl !== null) { - if (!is_object($this->tbl)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); - $xfer += $this->tbl->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_create_table_result { - static $_TSPEC; - - public $o1 = null; - public $o2 = null; - public $o3 = null; - public $o4 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 4 => array( - 'var' => 'o4', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - ); - } - 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']; - } - if (isset($vals['o4'])) { - $this->o4 = $vals['o4']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_create_table_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 metastore_AlreadyExistsException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_InvalidObjectException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_MetaException(); - $xfer += $this->o3->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRUCT) { - $this->o4 = new metastore_NoSuchObjectException(); - $xfer += $this->o4->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_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(); - } - 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; - } - -} - -class metastore_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_drop_table_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::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; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); - if ($this->dbname !== null) { - $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); - $xfer += $output->writeString($this->dbname); - $xfer += $output->writeFieldEnd(); - } - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 2); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_drop_table_result { - static $_TSPEC; - - public $o1 = null; - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } - if (isset($vals['o3'])) { - $this->o3 = $vals['o3']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_table_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 metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_table_result'); - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o3 !== null) { - $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); - $xfer += $this->o3->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_tables_args { - static $_TSPEC; - - public $db_name = null; - public $pattern = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'pattern', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['pattern'])) { - $this->pattern = $vals['pattern']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_tables_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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - 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_tables_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->pattern !== null) { - $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); - $xfer += $output->writeString($this->pattern); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_tables_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' => 'metastore_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_tables_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(); - $_size140 = 0; - $_etype143 = 0; - $xfer += $input->readListBegin($_etype143, $_size140); - for ($_i144 = 0; $_i144 < $_size140; ++$_i144) - { - $elem145 = null; - $xfer += $input->readString($elem145); - $this->success []= $elem145; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $iter146) - { - $xfer += $output->writeString($iter146); - } - } - $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 metastore_ThriftHiveMetastore_get_all_tables_args { - static $_TSPEC; - - public $db_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_all_tables_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->db_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_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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_all_tables_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' => 'metastore_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_tables_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(); - $_size147 = 0; - $_etype150 = 0; - $xfer += $input->readListBegin($_etype150, $_size147); - for ($_i151 = 0; $_i151 < $_size147; ++$_i151) - { - $elem152 = null; - $xfer += $input->readString($elem152); - $this->success []= $elem152; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $iter153) - { - $xfer += $output->writeString($iter153); - } - } - $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 metastore_ThriftHiveMetastore_get_table_args { - static $_TSPEC; - - public $dbname = null; - public $tbl_name = 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, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['dbname'])) { - $this->dbname = $vals['dbname']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_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::STRING) { - $xfer += $input->readString($this->tbl_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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_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::STRUCT, - 'class' => 'metastore_Table', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_table_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 metastore_Table(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_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); - $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 metastore_ThriftHiveMetastore_alter_table_args { - static $_TSPEC; - - 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' => 'dbname', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'new_tbl', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', - ), - ); - } - 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_tbl'])) { - $this->new_tbl = $vals['new_tbl']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_table_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::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->new_tbl = new metastore_Table(); - $xfer += $this->new_tbl->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_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(); - } - 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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_alter_table_result { - static $_TSPEC; - - public $o1 = null; - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_table_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 metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_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; - } - -} - -class metastore_ThriftHiveMetastore_add_partition_args { - static $_TSPEC; - - public $new_part = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['new_part'])) { - $this->new_part = $vals['new_part']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_partition_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->new_part = new metastore_Partition(); - $xfer += $this->new_part->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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_add_partition_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_add_partition_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 metastore_Partition(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_add_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); - $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 metastore_ThriftHiveMetastore_append_partition_args { - static $_TSPEC; - - 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' => '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, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_append_partition_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->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(); - $_size154 = 0; - $_etype157 = 0; - $xfer += $input->readListBegin($_etype157, $_size154); - for ($_i158 = 0; $_i158 < $_size154; ++$_i158) - { - $elem159 = null; - $xfer += $input->readString($elem159); - $this->part_vals []= $elem159; - } - $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_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) { - $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('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter160) - { - $xfer += $output->writeString($iter160); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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' => 'metastore_Partition', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_append_partition_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 metastore_Partition(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_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); - $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 metastore_ThriftHiveMetastore_append_partition_by_name_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = 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', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', - '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['part_name'])) { - $this->part_name = $vals['part_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_append_partition_by_name_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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $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) { - $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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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' => 'metastore_Partition', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_append_partition_by_name_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 metastore_Partition(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_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); - $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 metastore_ThriftHiveMetastore_drop_partition_args { - static $_TSPEC; - - 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' => '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['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_drop_partition_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->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(); - $_size161 = 0; - $_etype164 = 0; - $xfer += $input->readListBegin($_etype164, $_size161); - for ($_i165 = 0; $_i165 < $_size161; ++$_i165) - { - $elem166 = null; - $xfer += $input->readString($elem166); - $this->part_vals []= $elem166; - } - $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); - } - 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_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('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter167) - { - $xfer += $output->writeString($iter167); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_drop_partition_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::BOOL, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_drop_partition_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::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_drop_partition_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $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 metastore_ThriftHiveMetastore_drop_partition_by_name_args { - static $_TSPEC; - - 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' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'deleteData', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; - } - if (isset($vals['deleteData'])) { - $this->deleteData = $vals['deleteData']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_drop_partition_by_name_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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deleteData); - } else { - $xfer += $input->skip($ftype); - } - 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_partition_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->deleteData !== null) { - $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); - $xfer += $output->writeBool($this->deleteData); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_drop_partition_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::BOOL, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_drop_partition_by_name_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::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_drop_partition_by_name_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partition_args { - static $_TSPEC; - - 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' => '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, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['part_vals'])) { - $this->part_vals = $vals['part_vals']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_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->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(); - $_size168 = 0; - $_etype171 = 0; - $xfer += $input->readListBegin($_etype171, $_size168); - for ($_i172 = 0; $_i172 < $_size168; ++$_i172) - { - $elem173 = null; - $xfer += $input->readString($elem173); - $this->part_vals []= $elem173; - } - $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_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('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter174) - { - $xfer += $output->writeString($iter174); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_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::STRUCT, - 'class' => 'metastore_Partition', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_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 metastore_Partition(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_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 metastore_ThriftHiveMetastore_get_partition_by_name_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = 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', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'part_name', - '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['part_name'])) { - $this->part_name = $vals['part_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_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->db_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tbl_name); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->part_name); - } else { - $xfer += $input->skip($ftype); - } - break; - 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_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->part_name !== null) { - $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); - $xfer += $output->writeString($this->part_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partition_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::STRUCT, - 'class' => 'metastore_Partition', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_by_name_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 metastore_Partition(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_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); - $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 metastore_ThriftHiveMetastore_get_partitions_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $max_parts = -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' => '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['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_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->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::I16) { - $xfer += $input->readI16($this->max_parts); - } 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_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->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partitions_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_partitions_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(); - $_size175 = 0; - $_etype178 = 0; - $xfer += $input->readListBegin($_etype178, $_size175); - for ($_i179 = 0; $_i179 < $_size175; ++$_i179) - { - $elem180 = null; - $elem180 = new metastore_Partition(); - $xfer += $elem180->read($input); - $this->success []= $elem180; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_partitions_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter181) - { - $xfer += $iter181->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, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partition_names_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $max_parts = -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' => '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['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_names_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->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::I16) { - $xfer += $input->readI16($this->max_parts); - } 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_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->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partition_names_result { - static $_TSPEC; - - public $success = 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' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partition_names_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(); - $_size182 = 0; - $_etype185 = 0; - $xfer += $input->readListBegin($_etype185, $_size182); - for ($_i186 = 0; $_i186 < $_size182; ++$_i186) - { - $elem187 = null; - $xfer += $input->readString($elem187); - $this->success []= $elem187; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_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 $iter188) - { - $xfer += $output->writeString($iter188); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partitions_ps_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $part_vals = null; - public $max_parts = -1; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - 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::LST, - 'etype' => TType::STRING, - 'elem' => array( - '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['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_partitions_ps_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->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(); - $_size189 = 0; - $_etype192 = 0; - $xfer += $input->readListBegin($_etype192, $_size189); - for ($_i193 = 0; $_i193 < $_size189; ++$_i193) - { - $elem194 = null; - $xfer += $input->readString($elem194); - $this->part_vals []= $elem194; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $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); - $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('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter195) - { - $xfer += $output->writeString($iter195); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partitions_ps_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::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Partition', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_partitions_ps_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(); - $_size196 = 0; - $_etype199 = 0; - $xfer += $input->readListBegin($_etype199, $_size196); - for ($_i200 = 0; $_i200 < $_size196; ++$_i200) - { - $elem201 = null; - $elem201 = new metastore_Partition(); - $xfer += $elem201->read($input); - $this->success []= $elem201; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $iter202) - { - $xfer += $iter202->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(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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) { - 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::LST, - 'etype' => TType::STRING, - 'elem' => array( - '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['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_names_ps_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->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(); - $_size203 = 0; - $_etype206 = 0; - $xfer += $input->readListBegin($_etype206, $_size203); - for ($_i207 = 0; $_i207 < $_size203; ++$_i207) - { - $elem208 = null; - $xfer += $input->readString($elem208); - $this->part_vals []= $elem208; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - public function write($output) { - $xfer = 0; - $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); - $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('part_vals', TType::LST, 3); - { - $output->writeListBegin(TType::STRING, count($this->part_vals)); - { - foreach ($this->part_vals as $iter209) - { - $xfer += $output->writeString($iter209); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partition_names_ps_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' => 'metastore_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_partition_names_ps_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(); - $_size210 = 0; - $_etype213 = 0; - $xfer += $input->readListBegin($_etype213, $_size210); - for ($_i214 = 0; $_i214 < $_size210; ++$_i214) - { - $elem215 = null; - $xfer += $input->readString($elem215); - $this->success []= $elem215; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $iter216) - { - $xfer += $output->writeString($iter216); - } - } - $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 metastore_ThriftHiveMetastore_get_partitions_by_filter_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $filter = null; - public $max_parts = -1; - - public function __construct($vals=null) { - 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' => 'filter', - '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['max_parts'])) { - $this->max_parts = $vals['max_parts']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_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->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->filter); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I16) { - $xfer += $input->readI16($this->max_parts); - } else { - $xfer += $input->skip($ftype); - } - break; - default: - $xfer += $input->skip($ftype); - break; - } - $xfer += $input->readFieldEnd(); - } - $xfer += $input->readStructEnd(); - return $xfer; - } - - 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->writeFieldEnd(); - } - if ($this->max_parts !== null) { - $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); - $xfer += $output->writeI16($this->max_parts); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_partitions_by_filter_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' => 'metastore_Partition', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_partitions_by_filter_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(); - $_size217 = 0; - $_etype220 = 0; - $xfer += $input->readListBegin($_etype220, $_size217); - for ($_i221 = 0; $_i221 < $_size217; ++$_i221) - { - $elem222 = null; - $elem222 = new metastore_Partition(); - $xfer += $elem222->read($input); - $this->success []= $elem222; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_partitions_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::STRUCT, count($this->success)); - { - foreach ($this->success as $iter223) - { - $xfer += $iter223->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, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_alter_partition_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $new_part = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'new_part', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_partition_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->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 metastore_Partition(); - $xfer += $this->new_part->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_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->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_alter_partition_result { - static $_TSPEC; - - public $o1 = null; - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidOperationException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['o1'])) { - $this->o1 = $vals['o1']; - } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_alter_partition_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 metastore_InvalidOperationException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_alter_partition_result'); - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_config_value_args { - static $_TSPEC; - - public $name = null; - public $defaultValue = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'defaultValue', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['defaultValue'])) { - $this->defaultValue = $vals['defaultValue']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_config_value_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::STRING) { - $xfer += $input->readString($this->defaultValue); - } 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_config_value_args'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->defaultValue !== null) { - $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); - $xfer += $output->writeString($this->defaultValue); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_config_value_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::STRING, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_ConfigValSecurityException', - ), - ); - } - 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_config_value_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::STRING) { - $xfer += $input->readString($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_ConfigValSecurityException(); - $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_config_value_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); - $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 metastore_ThriftHiveMetastore_partition_name_to_vals_args { - static $_TSPEC; - - public $part_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_partition_name_to_vals_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->part_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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_partition_name_to_vals_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' => 'metastore_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_partition_name_to_vals_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(); - $_size224 = 0; - $_etype227 = 0; - $xfer += $input->readListBegin($_etype227, $_size224); - for ($_i228 = 0; $_i228 < $_size224; ++$_i228) - { - $elem229 = null; - $xfer += $input->readString($elem229); - $this->success []= $elem229; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $iter230) - { - $xfer += $output->writeString($iter230); - } - } - $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 metastore_ThriftHiveMetastore_partition_name_to_spec_args { - static $_TSPEC; - - public $part_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'part_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['part_name'])) { - $this->part_name = $vals['part_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_partition_name_to_spec_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->part_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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_partition_name_to_spec_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::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' => 'metastore_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_partition_name_to_spec_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::MAP) { - $this->success = array(); - $_size231 = 0; - $_ktype232 = 0; - $_vtype233 = 0; - $xfer += $input->readMapBegin($_ktype232, $_vtype233, $_size231); - for ($_i235 = 0; $_i235 < $_size231; ++$_i235) - { - $key236 = ''; - $val237 = ''; - $xfer += $input->readString($key236); - $xfer += $input->readString($val237); - $this->success[$key236] = $val237; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_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_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 $kiter238 => $viter239) - { - $xfer += $output->writeString($kiter238); - $xfer += $output->writeString($viter239); - } - } - $output->writeMapEnd(); - } - $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 metastore_ThriftHiveMetastore_add_index_args { - static $_TSPEC; - - public $new_index = null; - public $index_table = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'new_index', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), - 2 => array( - 'var' => 'index_table', - 'type' => TType::STRUCT, - 'class' => 'metastore_Table', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['new_index'])) { - $this->new_index = $vals['new_index']; - } - if (isset($vals['index_table'])) { - $this->index_table = $vals['index_table']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_add_index_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->new_index = new metastore_Index(); - $xfer += $this->new_index->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->index_table = new metastore_Table(); - $xfer += $this->index_table->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_add_index_args'); - if ($this->new_index !== null) { - if (!is_object($this->new_index)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); - $xfer += $this->new_index->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->index_table !== null) { - if (!is_object($this->index_table)) { - 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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_add_index_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - public $o3 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_InvalidObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_AlreadyExistsException', - ), - 3 => array( - 'var' => 'o3', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_add_index_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 metastore_Index(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_InvalidObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_AlreadyExistsException(); - $xfer += $this->o2->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRUCT) { - $this->o3 = new metastore_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_add_index_result'); - if ($this->success !== null) { - if (!is_object($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); - $xfer += $this->success->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $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 metastore_ThriftHiveMetastore_drop_index_by_name_args { - static $_TSPEC; - - 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' => '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['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_drop_index_by_name_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->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); - } - 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_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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_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::BOOL, - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_drop_index_by_name_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::BOOL) { - $xfer += $input->readBool($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_drop_index_by_name_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); - $xfer += $output->writeBool($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->o1 !== null) { - $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); - $xfer += $this->o1->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_index_by_name_args { - static $_TSPEC; - - public $db_name = null; - public $tbl_name = null; - public $index_name = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'index_name', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['db_name'])) { - $this->db_name = $vals['db_name']; - } - if (isset($vals['tbl_name'])) { - $this->tbl_name = $vals['tbl_name']; - } - if (isset($vals['index_name'])) { - $this->index_name = $vals['index_name']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_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->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; - 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_index_by_name_args'); - if ($this->db_name !== null) { - $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); - $xfer += $output->writeString($this->db_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->tbl_name !== null) { - $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); - $xfer += $output->writeString($this->tbl_name); - $xfer += $output->writeFieldEnd(); - } - if ($this->index_name !== null) { - $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); - $xfer += $output->writeString($this->index_name); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_index_by_name_result { - static $_TSPEC; - - public $success = null; - public $o1 = null; - public $o2 = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Index', - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_index_by_name_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 metastore_Index(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_MetaException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_NoSuchObjectException(); - $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_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); - $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 metastore_ThriftHiveMetastore_get_indexes_args { - static $_TSPEC; - - 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' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'max_indexes', - '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['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_indexes_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->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::I16) { - $xfer += $input->readI16($this->max_indexes); - } 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_indexes_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->max_indexes !== null) { - $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); - $xfer += $output->writeI16($this->max_indexes); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_indexes_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' => 'metastore_Index', - ), - ), - 1 => array( - 'var' => 'o1', - 'type' => TType::STRUCT, - 'class' => 'metastore_NoSuchObjectException', - ), - 2 => array( - 'var' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_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_indexes_result'; - } - - public function read($input) - { - $xfer = 0; - $fname = null; - $ftype = 0; - $fid = 0; - $xfer += $input->readStructBegin($fname); - while (true) - { - $xfer += $input->readFieldBegin($fname, $ftype, $fid); - if ($ftype == TType::STOP) { - break; - } - switch ($fid) - { - case 0: - if ($ftype == TType::LST) { - $this->success = array(); - $_size240 = 0; - $_etype243 = 0; - $xfer += $input->readListBegin($_etype243, $_size240); - for ($_i244 = 0; $_i244 < $_size240; ++$_i244) - { - $elem245 = null; - $elem245 = new metastore_Index(); - $xfer += $elem245->read($input); - $this->success []= $elem245; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o1 = new metastore_NoSuchObjectException(); - $xfer += $this->o1->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_indexes_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRUCT, count($this->success)); - { - foreach ($this->success as $iter246) - { - $xfer += $iter246->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, 2); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_index_names_args { - static $_TSPEC; - - 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' => 'db_name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'tbl_name', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'max_indexes', - '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['max_indexes'])) { - $this->max_indexes = $vals['max_indexes']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_index_names_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->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::I16) { - $xfer += $input->readI16($this->max_indexes); - } 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_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->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(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_ThriftHiveMetastore_get_index_names_result { - static $_TSPEC; - - public $success = 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' => 'o2', - 'type' => TType::STRUCT, - 'class' => 'metastore_MetaException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['o2'])) { - $this->o2 = $vals['o2']; - } - } - } - - public function getName() { - return 'ThriftHiveMetastore_get_index_names_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(); - $_size247 = 0; - $_etype250 = 0; - $xfer += $input->readListBegin($_etype250, $_size247); - for ($_i251 = 0; $_i251 < $_size247; ++$_i251) - { - $elem252 = null; - $xfer += $input->readString($elem252); - $this->success []= $elem252; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->o2 = new metastore_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_index_names_result'); - if ($this->success !== null) { - if (!is_array($this->success)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('success', TType::LST, 0); - { - $output->writeListBegin(TType::STRING, count($this->success)); - { - foreach ($this->success as $iter253) - { - $xfer += $output->writeString($iter253); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->o2 !== null) { - $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); - $xfer += $this->o2->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -?> diff --git metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php new file mode 100644 index 0000000..ef972ef --- /dev/null +++ metastore/src/gen-php/hive_metastore/ThriftHiveMetastore.php @@ -0,0 +1,10881 @@ +send_create_database($database); + $this->recv_create_database(); + } + + public function send_create_database($database) + { + $args = new metastore_ThriftHiveMetastore_create_database_args(); + $args->database = $database; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_database_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 metastore_ThriftHiveMetastore_create_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_database($name) + { + $this->send_get_database($name); + return $this->recv_get_database(); + } + + public function send_get_database($name) + { + $args = new metastore_ThriftHiveMetastore_get_database_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_database_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 metastore_ThriftHiveMetastore_get_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_database failed: unknown result"); + } + + public function drop_database($name, $deleteData) + { + $this->send_drop_database($name, $deleteData); + $this->recv_drop_database(); + } + + public function send_drop_database($name, $deleteData) + { + $args = new metastore_ThriftHiveMetastore_drop_database_args(); + $args->name = $name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_database', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_database', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_database() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_database_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 metastore_ThriftHiveMetastore_drop_database_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_databases($pattern) + { + $this->send_get_databases($pattern); + return $this->recv_get_databases(); + } + + public function send_get_databases($pattern) + { + $args = new metastore_ThriftHiveMetastore_get_databases_args(); + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_databases() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_databases_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 metastore_ThriftHiveMetastore_get_databases_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_databases failed: unknown result"); + } + + public function get_all_databases() + { + $this->send_get_all_databases(); + return $this->recv_get_all_databases(); + } + + public function send_get_all_databases() + { + $args = new metastore_ThriftHiveMetastore_get_all_databases_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_databases', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_databases', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_databases() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_databases_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 metastore_ThriftHiveMetastore_get_all_databases_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_all_databases failed: unknown result"); + } + + public function get_type($name) + { + $this->send_get_type($name); + return $this->recv_get_type(); + } + + public function send_get_type($name) + { + $args = new metastore_ThriftHiveMetastore_get_type_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_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 metastore_ThriftHiveMetastore_get_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_type failed: unknown result"); + } + + public function create_type($type) + { + $this->send_create_type($type); + return $this->recv_create_type(); + } + + public function send_create_type($type) + { + $args = new metastore_ThriftHiveMetastore_create_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_type_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 metastore_ThriftHiveMetastore_create_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("create_type failed: unknown result"); + } + + public function drop_type($type) + { + $this->send_drop_type($type); + return $this->recv_drop_type(); + } + + public function send_drop_type($type) + { + $args = new metastore_ThriftHiveMetastore_drop_type_args(); + $args->type = $type; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_type', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_type', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_type() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_type_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 metastore_ThriftHiveMetastore_drop_type_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("drop_type failed: unknown result"); + } + + public function get_type_all($name) + { + $this->send_get_type_all($name); + return $this->recv_get_type_all(); + } + + public function send_get_type_all($name) + { + $args = new metastore_ThriftHiveMetastore_get_type_all_args(); + $args->name = $name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_type_all', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_type_all', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_type_all() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_type_all_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 metastore_ThriftHiveMetastore_get_type_all_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_type_all failed: unknown result"); + } + + public function get_fields($db_name, $table_name) + { + $this->send_get_fields($db_name, $table_name); + return $this->recv_get_fields(); + } + + public function send_get_fields($db_name, $table_name) + { + $args = new metastore_ThriftHiveMetastore_get_fields_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_fields', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_fields', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_fields() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_fields_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 metastore_ThriftHiveMetastore_get_fields_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("get_fields failed: unknown result"); + } + + public function get_schema($db_name, $table_name) + { + $this->send_get_schema($db_name, $table_name); + return $this->recv_get_schema(); + } + + public function send_get_schema($db_name, $table_name) + { + $args = new metastore_ThriftHiveMetastore_get_schema_args(); + $args->db_name = $db_name; + $args->table_name = $table_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_schema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_schema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_schema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_schema_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 metastore_ThriftHiveMetastore_get_schema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("get_schema failed: unknown result"); + } + + public function create_table($tbl) + { + $this->send_create_table($tbl); + $this->recv_create_table(); + } + + public function send_create_table($tbl) + { + $args = new metastore_ThriftHiveMetastore_create_table_args(); + $args->tbl = $tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'create_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('create_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_create_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_create_table_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 metastore_ThriftHiveMetastore_create_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + 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; + } + return; + } + + public function drop_table($dbname, $name, $deleteData) + { + $this->send_drop_table($dbname, $name, $deleteData); + $this->recv_drop_table(); + } + + public function send_drop_table($dbname, $name, $deleteData) + { + $args = new metastore_ThriftHiveMetastore_drop_table_args(); + $args->dbname = $dbname; + $args->name = $name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_table_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 metastore_ThriftHiveMetastore_drop_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o3 !== null) { + throw $result->o3; + } + return; + } + + public function get_tables($db_name, $pattern) + { + $this->send_get_tables($db_name, $pattern); + return $this->recv_get_tables(); + } + + public function send_get_tables($db_name, $pattern) + { + $args = new metastore_ThriftHiveMetastore_get_tables_args(); + $args->db_name = $db_name; + $args->pattern = $pattern; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_tables() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_tables_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 metastore_ThriftHiveMetastore_get_tables_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_tables failed: unknown result"); + } + + public function get_all_tables($db_name) + { + $this->send_get_all_tables($db_name); + return $this->recv_get_all_tables(); + } + + public function send_get_all_tables($db_name) + { + $args = new metastore_ThriftHiveMetastore_get_all_tables_args(); + $args->db_name = $db_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_all_tables', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_all_tables', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_all_tables() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_all_tables_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 metastore_ThriftHiveMetastore_get_all_tables_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_all_tables failed: unknown result"); + } + + public function get_table($dbname, $tbl_name) + { + $this->send_get_table($dbname, $tbl_name); + return $this->recv_get_table(); + } + + public function send_get_table($dbname, $tbl_name) + { + $args = new metastore_ThriftHiveMetastore_get_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_table_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 metastore_ThriftHiveMetastore_get_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_table failed: unknown result"); + } + + public function alter_table($dbname, $tbl_name, $new_tbl) + { + $this->send_alter_table($dbname, $tbl_name, $new_tbl); + $this->recv_alter_table(); + } + + public function send_alter_table($dbname, $tbl_name, $new_tbl) + { + $args = new metastore_ThriftHiveMetastore_alter_table_args(); + $args->dbname = $dbname; + $args->tbl_name = $tbl_name; + $args->new_tbl = $new_tbl; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_table', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_table', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_table() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_table_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 metastore_ThriftHiveMetastore_alter_table_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function add_partition($new_part) + { + $this->send_add_partition($new_part); + return $this->recv_add_partition(); + } + + public function send_add_partition($new_part) + { + $args = new metastore_ThriftHiveMetastore_add_partition_args(); + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_partition_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 metastore_ThriftHiveMetastore_add_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("add_partition failed: unknown result"); + } + + public function append_partition($db_name, $tbl_name, $part_vals) + { + $this->send_append_partition($db_name, $tbl_name, $part_vals); + return $this->recv_append_partition(); + } + + public function send_append_partition($db_name, $tbl_name, $part_vals) + { + $args = new metastore_ThriftHiveMetastore_append_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_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 metastore_ThriftHiveMetastore_append_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("append_partition failed: unknown result"); + } + + public function append_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_append_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_append_partition_by_name(); + } + + public function send_append_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new metastore_ThriftHiveMetastore_append_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'append_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('append_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_append_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_append_partition_by_name_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 metastore_ThriftHiveMetastore_append_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("append_partition_by_name failed: unknown result"); + } + + public function drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $this->send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData); + return $this->recv_drop_partition(); + } + + public function send_drop_partition($db_name, $tbl_name, $part_vals, $deleteData) + { + $args = new metastore_ThriftHiveMetastore_drop_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_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 metastore_ThriftHiveMetastore_drop_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("drop_partition failed: unknown result"); + } + + public function drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $this->send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData); + return $this->recv_drop_partition_by_name(); + } + + public function send_drop_partition_by_name($db_name, $tbl_name, $part_name, $deleteData) + { + $args = new metastore_ThriftHiveMetastore_drop_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_partition_by_name_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 metastore_ThriftHiveMetastore_drop_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("drop_partition_by_name failed: unknown result"); + } + + public function get_partition($db_name, $tbl_name, $part_vals) + { + $this->send_get_partition($db_name, $tbl_name, $part_vals); + return $this->recv_get_partition(); + } + + public function send_get_partition($db_name, $tbl_name, $part_vals) + { + $args = new metastore_ThriftHiveMetastore_get_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_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 metastore_ThriftHiveMetastore_get_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partition failed: unknown result"); + } + + public function get_partition_by_name($db_name, $tbl_name, $part_name) + { + $this->send_get_partition_by_name($db_name, $tbl_name, $part_name); + return $this->recv_get_partition_by_name(); + } + + public function send_get_partition_by_name($db_name, $tbl_name, $part_name) + { + $args = new metastore_ThriftHiveMetastore_get_partition_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_by_name_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 metastore_ThriftHiveMetastore_get_partition_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partition_by_name failed: unknown result"); + } + + public function get_partitions($db_name, $tbl_name, $max_parts) + { + $this->send_get_partitions($db_name, $tbl_name, $max_parts); + return $this->recv_get_partitions(); + } + + public function send_get_partitions($db_name, $tbl_name, $max_parts) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_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 metastore_ThriftHiveMetastore_get_partitions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions failed: unknown result"); + } + + public function get_partition_names($db_name, $tbl_name, $max_parts) + { + $this->send_get_partition_names($db_name, $tbl_name, $max_parts); + return $this->recv_get_partition_names(); + } + + public function send_get_partition_names($db_name, $tbl_name, $max_parts) + { + $args = new metastore_ThriftHiveMetastore_get_partition_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_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 metastore_ThriftHiveMetastore_get_partition_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partition_names failed: unknown result"); + } + + public function get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partitions_ps(); + } + + public function send_get_partitions_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_ps() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_ps_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 metastore_ThriftHiveMetastore_get_partitions_ps_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_partitions_ps failed: unknown result"); + } + + public function get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $this->send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts); + return $this->recv_get_partition_names_ps(); + } + + public function send_get_partition_names_ps($db_name, $tbl_name, $part_vals, $max_parts) + { + $args = new metastore_ThriftHiveMetastore_get_partition_names_ps_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->part_vals = $part_vals; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partition_names_ps', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partition_names_ps', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partition_names_ps() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partition_names_ps_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 metastore_ThriftHiveMetastore_get_partition_names_ps_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_partition_names_ps failed: unknown result"); + } + + public function get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $this->send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts); + return $this->recv_get_partitions_by_filter(); + } + + public function send_get_partitions_by_filter($db_name, $tbl_name, $filter, $max_parts) + { + $args = new metastore_ThriftHiveMetastore_get_partitions_by_filter_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->filter = $filter; + $args->max_parts = $max_parts; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_partitions_by_filter', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_partitions_by_filter', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_partitions_by_filter() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_partitions_by_filter_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 metastore_ThriftHiveMetastore_get_partitions_by_filter_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_partitions_by_filter failed: unknown result"); + } + + public function alter_partition($db_name, $tbl_name, $new_part) + { + $this->send_alter_partition($db_name, $tbl_name, $new_part); + $this->recv_alter_partition(); + } + + public function send_alter_partition($db_name, $tbl_name, $new_part) + { + $args = new metastore_ThriftHiveMetastore_alter_partition_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->new_part = $new_part; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'alter_partition', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('alter_partition', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_alter_partition() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_alter_partition_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 metastore_ThriftHiveMetastore_alter_partition_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + return; + } + + public function get_config_value($name, $defaultValue) + { + $this->send_get_config_value($name, $defaultValue); + return $this->recv_get_config_value(); + } + + public function send_get_config_value($name, $defaultValue) + { + $args = new metastore_ThriftHiveMetastore_get_config_value_args(); + $args->name = $name; + $args->defaultValue = $defaultValue; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_config_value', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_config_value', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_config_value() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_config_value_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 metastore_ThriftHiveMetastore_get_config_value_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_config_value failed: unknown result"); + } + + public function partition_name_to_vals($part_name) + { + $this->send_partition_name_to_vals($part_name); + return $this->recv_partition_name_to_vals(); + } + + public function send_partition_name_to_vals($part_name) + { + $args = new metastore_ThriftHiveMetastore_partition_name_to_vals_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_vals', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_vals', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_vals() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_vals_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 metastore_ThriftHiveMetastore_partition_name_to_vals_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("partition_name_to_vals failed: unknown result"); + } + + public function partition_name_to_spec($part_name) + { + $this->send_partition_name_to_spec($part_name); + return $this->recv_partition_name_to_spec(); + } + + public function send_partition_name_to_spec($part_name) + { + $args = new metastore_ThriftHiveMetastore_partition_name_to_spec_args(); + $args->part_name = $part_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'partition_name_to_spec', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('partition_name_to_spec', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_partition_name_to_spec() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_partition_name_to_spec_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 metastore_ThriftHiveMetastore_partition_name_to_spec_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("partition_name_to_spec failed: unknown result"); + } + + public function add_index($new_index, $index_table) + { + $this->send_add_index($new_index, $index_table); + return $this->recv_add_index(); + } + + public function send_add_index($new_index, $index_table) + { + $args = new metastore_ThriftHiveMetastore_add_index_args(); + $args->new_index = $new_index; + $args->index_table = $index_table; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'add_index', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('add_index', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_add_index() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_add_index_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 metastore_ThriftHiveMetastore_add_index_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + if ($result->o3 !== null) { + throw $result->o3; + } + throw new Exception("add_index failed: unknown result"); + } + + public function drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $this->send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData); + return $this->recv_drop_index_by_name(); + } + + public function send_drop_index_by_name($db_name, $tbl_name, $index_name, $deleteData) + { + $args = new metastore_ThriftHiveMetastore_drop_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $args->deleteData = $deleteData; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'drop_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('drop_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_drop_index_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_drop_index_by_name_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 metastore_ThriftHiveMetastore_drop_index_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("drop_index_by_name failed: unknown result"); + } + + public function get_index_by_name($db_name, $tbl_name, $index_name) + { + $this->send_get_index_by_name($db_name, $tbl_name, $index_name); + return $this->recv_get_index_by_name(); + } + + public function send_get_index_by_name($db_name, $tbl_name, $index_name) + { + $args = new metastore_ThriftHiveMetastore_get_index_by_name_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->index_name = $index_name; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_by_name', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_by_name', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_by_name() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_index_by_name_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 metastore_ThriftHiveMetastore_get_index_by_name_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_index_by_name failed: unknown result"); + } + + public function get_indexes($db_name, $tbl_name, $max_indexes) + { + $this->send_get_indexes($db_name, $tbl_name, $max_indexes); + return $this->recv_get_indexes(); + } + + public function send_get_indexes($db_name, $tbl_name, $max_indexes) + { + $args = new metastore_ThriftHiveMetastore_get_indexes_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_indexes', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_indexes', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_indexes() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_indexes_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 metastore_ThriftHiveMetastore_get_indexes_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o1 !== null) { + throw $result->o1; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_indexes failed: unknown result"); + } + + public function get_index_names($db_name, $tbl_name, $max_indexes) + { + $this->send_get_index_names($db_name, $tbl_name, $max_indexes); + return $this->recv_get_index_names(); + } + + public function send_get_index_names($db_name, $tbl_name, $max_indexes) + { + $args = new metastore_ThriftHiveMetastore_get_index_names_args(); + $args->db_name = $db_name; + $args->tbl_name = $tbl_name; + $args->max_indexes = $max_indexes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get_index_names', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get_index_names', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get_index_names() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'metastore_ThriftHiveMetastore_get_index_names_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 metastore_ThriftHiveMetastore_get_index_names_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->o2 !== null) { + throw $result->o2; + } + throw new Exception("get_index_names failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class metastore_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' => 'metastore_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 metastore_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 metastore_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' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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 metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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 metastore_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 metastore_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' => 'metastore_Database', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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 metastore_Database(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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 metastore_ThriftHiveMetastore_drop_database_args { + static $_TSPEC; + + public $name = null; + public $deleteData = 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, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + 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; + 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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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 metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidOperationException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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 metastore_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 metastore_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' => 'metastore_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(); + $_size103 = 0; + $_etype106 = 0; + $xfer += $input->readListBegin($_etype106, $_size103); + for ($_i107 = 0; $_i107 < $_size103; ++$_i107) + { + $elem108 = null; + $xfer += $input->readString($elem108); + $this->success []= $elem108; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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 $iter109) + { + $xfer += $output->writeString($iter109); + } + } + $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 metastore_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 metastore_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' => 'metastore_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(); + $_size110 = 0; + $_etype113 = 0; + $xfer += $input->readListBegin($_etype113, $_size110); + for ($_i114 = 0; $_i114 < $_size110; ++$_i114) + { + $elem115 = null; + $xfer += $input->readString($elem115); + $this->success []= $elem115; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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 $iter116) + { + $xfer += $output->writeString($iter116); + } + } + $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 metastore_ThriftHiveMetastore_get_type_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_type_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_type_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 metastore_ThriftHiveMetastore_get_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::STRUCT, + 'class' => 'metastore_Type', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_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 metastore_Type(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_type_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $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 metastore_ThriftHiveMetastore_create_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_type_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->type = new metastore_Type(); + $xfer += $this->type->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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_type_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_create_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_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); + $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 metastore_ThriftHiveMetastore_drop_type_args { + static $_TSPEC; + + public $type = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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->type); + } 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_type_args'); + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 1); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_type_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_drop_type_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $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 metastore_ThriftHiveMetastore_get_type_all_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_type_all_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_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; + } + +} + +class metastore_ThriftHiveMetastore_get_type_all_result { + static $_TSPEC; + + public $success = 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::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Type', + ), + ), + 1 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_type_all_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::MAP) { + $this->success = array(); + $_size117 = 0; + $_ktype118 = 0; + $_vtype119 = 0; + $xfer += $input->readMapBegin($_ktype118, $_vtype119, $_size117); + for ($_i121 = 0; $_i121 < $_size117; ++$_i121) + { + $key122 = ''; + $val123 = new metastore_Type(); + $xfer += $input->readString($key122); + $val123 = new metastore_Type(); + $xfer += $val123->read($input); + $this->success[$key122] = $val123; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_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 $kiter124 => $viter125) + { + $xfer += $output->writeString($kiter124); + $xfer += $viter125->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_fields_args { + static $_TSPEC; + + public $db_name = null; + public $table_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' => 'table_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['table_name'])) { + $this->table_name = $vals['table_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_fields_args'; + } + + 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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_fields_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->table_name !== null) { + $xfer += $output->writeFieldBegin('table_name', TType::STRING, 2); + $xfer += $output->writeString($this->table_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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' => 'metastore_FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_get_fields_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(); + $_size126 = 0; + $_etype129 = 0; + $xfer += $input->readListBegin($_etype129, $_size126); + for ($_i130 = 0; $_i130 < $_size126; ++$_i130) + { + $elem131 = null; + $elem131 = new metastore_FieldSchema(); + $xfer += $elem131->read($input); + $this->success []= $elem131; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_UnknownDBException(); + $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_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 $iter132) + { + $xfer += $iter132->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, 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 metastore_ThriftHiveMetastore_get_schema_args { + static $_TSPEC; + + public $db_name = null; + public $table_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' => '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'; + } + + 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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_get_schema_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->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; + } + +} + +class metastore_ThriftHiveMetastore_get_schema_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_UnknownTableException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_get_schema_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(); + $_size133 = 0; + $_etype136 = 0; + $xfer += $input->readListBegin($_etype136, $_size133); + for ($_i137 = 0; $_i137 < $_size133; ++$_i137) + { + $elem138 = null; + $elem138 = new metastore_FieldSchema(); + $xfer += $elem138->read($input); + $this->success []= $elem138; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_UnknownTableException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_UnknownDBException(); + $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_get_schema_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter139) + { + $xfer += $iter139->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, 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 metastore_ThriftHiveMetastore_create_table_args { + static $_TSPEC; + + public $tbl = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tbl'])) { + $this->tbl = $vals['tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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->tbl = new metastore_Table(); + $xfer += $this->tbl->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_table_args'); + if ($this->tbl !== null) { + if (!is_object($this->tbl)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('tbl', TType::STRUCT, 1); + $xfer += $this->tbl->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_create_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + public $o3 = null; + public $o4 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 4 => array( + 'var' => 'o4', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + ); + } + 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']; + } + if (isset($vals['o4'])) { + $this->o4 = $vals['o4']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_create_table_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 metastore_AlreadyExistsException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_InvalidObjectException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_MetaException(); + $xfer += $this->o3->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRUCT) { + $this->o4 = new metastore_NoSuchObjectException(); + $xfer += $this->o4->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_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(); + } + 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; + } + +} + +class metastore_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_drop_table_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::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; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ThriftHiveMetastore_drop_table_args'); + if ($this->dbname !== null) { + $xfer += $output->writeFieldBegin('dbname', TType::STRING, 1); + $xfer += $output->writeString($this->dbname); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 2); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 3); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_table_result { + static $_TSPEC; + + public $o1 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o3'])) { + $this->o3 = $vals['o3']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_table_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 metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_table_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o3 !== null) { + $xfer += $output->writeFieldBegin('o3', TType::STRUCT, 2); + $xfer += $this->o3->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_args { + static $_TSPEC; + + public $db_name = null; + public $pattern = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'pattern', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['pattern'])) { + $this->pattern = $vals['pattern']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_tables_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + 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_tables_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->pattern !== null) { + $xfer += $output->writeFieldBegin('pattern', TType::STRING, 2); + $xfer += $output->writeString($this->pattern); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_tables_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' => 'metastore_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_tables_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(); + $_size140 = 0; + $_etype143 = 0; + $xfer += $input->readListBegin($_etype143, $_size140); + for ($_i144 = 0; $_i144 < $_size140; ++$_i144) + { + $elem145 = null; + $xfer += $input->readString($elem145); + $this->success []= $elem145; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $iter146) + { + $xfer += $output->writeString($iter146); + } + } + $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 metastore_ThriftHiveMetastore_get_all_tables_args { + static $_TSPEC; + + public $db_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_all_tables_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->db_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_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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_all_tables_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' => 'metastore_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_tables_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(); + $_size147 = 0; + $_etype150 = 0; + $xfer += $input->readListBegin($_etype150, $_size147); + for ($_i151 = 0; $_i151 < $_size147; ++$_i151) + { + $elem152 = null; + $xfer += $input->readString($elem152); + $this->success []= $elem152; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $iter153) + { + $xfer += $output->writeString($iter153); + } + } + $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 metastore_ThriftHiveMetastore_get_table_args { + static $_TSPEC; + + public $dbname = null; + public $tbl_name = 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, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['dbname'])) { + $this->dbname = $vals['dbname']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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::STRING) { + $xfer += $input->readString($this->tbl_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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_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::STRUCT, + 'class' => 'metastore_Table', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_table_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 metastore_Table(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_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); + $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 metastore_ThriftHiveMetastore_alter_table_args { + static $_TSPEC; + + 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' => 'dbname', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_tbl', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + 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_tbl'])) { + $this->new_tbl = $vals['new_tbl']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->new_tbl = new metastore_Table(); + $xfer += $this->new_tbl->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_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(); + } + 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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_table_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_table_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 metastore_InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_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; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_args { + static $_TSPEC; + + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_part'])) { + $this->new_part = $vals['new_part']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_partition_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->new_part = new metastore_Partition(); + $xfer += $this->new_part->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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_add_partition_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 metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_add_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); + $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 metastore_ThriftHiveMetastore_append_partition_args { + static $_TSPEC; + + 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' => '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, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_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->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(); + $_size154 = 0; + $_etype157 = 0; + $xfer += $input->readListBegin($_etype157, $_size154); + for ($_i158 = 0; $_i158 < $_size154; ++$_i158) + { + $elem159 = null; + $xfer += $input->readString($elem159); + $this->part_vals []= $elem159; + } + $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_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) { + $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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter160) + { + $xfer += $output->writeString($iter160); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_append_partition_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 metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_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); + $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 metastore_ThriftHiveMetastore_append_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = 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', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + '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['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_append_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $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) { + $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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_append_partition_by_name_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 metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_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); + $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 metastore_ThriftHiveMetastore_drop_partition_args { + static $_TSPEC; + + 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' => '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['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_drop_partition_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->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(); + $_size161 = 0; + $_etype164 = 0; + $xfer += $input->readListBegin($_etype164, $_size161); + for ($_i165 = 0; $_i165 < $_size161; ++$_i165) + { + $elem166 = null; + $xfer += $input->readString($elem166); + $this->part_vals []= $elem166; + } + $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); + } + 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_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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter167) + { + $xfer += $output->writeString($iter167); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_drop_partition_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_drop_partition_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $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 metastore_ThriftHiveMetastore_drop_partition_by_name_args { + static $_TSPEC; + + 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' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'deleteData', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + if (isset($vals['deleteData'])) { + $this->deleteData = $vals['deleteData']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_drop_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deleteData); + } else { + $xfer += $input->skip($ftype); + } + 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_partition_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->deleteData !== null) { + $xfer += $output->writeFieldBegin('deleteData', TType::BOOL, 4); + $xfer += $output->writeBool($this->deleteData); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_drop_partition_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::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_drop_partition_by_name_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_drop_partition_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partition_args { + static $_TSPEC; + + 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' => '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, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['part_vals'])) { + $this->part_vals = $vals['part_vals']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_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->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(); + $_size168 = 0; + $_etype171 = 0; + $xfer += $input->readListBegin($_etype171, $_size168); + for ($_i172 = 0; $_i172 < $_size168; ++$_i172) + { + $elem173 = null; + $xfer += $input->readString($elem173); + $this->part_vals []= $elem173; + } + $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_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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter174) + { + $xfer += $output->writeString($iter174); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_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::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_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 metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_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 metastore_ThriftHiveMetastore_get_partition_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = 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', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'part_name', + '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['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_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->db_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tbl_name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->part_name); + } else { + $xfer += $input->skip($ftype); + } + break; + 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_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->part_name !== null) { + $xfer += $output->writeFieldBegin('part_name', TType::STRING, 3); + $xfer += $output->writeString($this->part_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partition_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::STRUCT, + 'class' => 'metastore_Partition', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_by_name_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 metastore_Partition(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_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); + $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 metastore_ThriftHiveMetastore_get_partitions_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -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' => '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['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_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->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::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_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->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partitions_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_partitions_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(); + $_size175 = 0; + $_etype178 = 0; + $xfer += $input->readListBegin($_etype178, $_size175); + for ($_i179 = 0; $_i179 < $_size175; ++$_i179) + { + $elem180 = null; + $elem180 = new metastore_Partition(); + $xfer += $elem180->read($input); + $this->success []= $elem180; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_partitions_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter181) + { + $xfer += $iter181->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, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partition_names_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $max_parts = -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' => '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['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_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->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::I16) { + $xfer += $input->readI16($this->max_parts); + } 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_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->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 3); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partition_names_result { + static $_TSPEC; + + public $success = 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' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partition_names_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(); + $_size182 = 0; + $_etype185 = 0; + $xfer += $input->readListBegin($_etype185, $_size182); + for ($_i186 = 0; $_i186 < $_size182; ++$_i186) + { + $elem187 = null; + $xfer += $input->readString($elem187); + $this->success []= $elem187; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_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 $iter188) + { + $xfer += $output->writeString($iter188); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partitions_ps_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $part_vals = null; + public $max_parts = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + 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::LST, + 'etype' => TType::STRING, + 'elem' => array( + '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['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_partitions_ps_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->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(); + $_size189 = 0; + $_etype192 = 0; + $xfer += $input->readListBegin($_etype192, $_size189); + for ($_i193 = 0; $_i193 < $_size189; ++$_i193) + { + $elem194 = null; + $xfer += $input->readString($elem194); + $this->part_vals []= $elem194; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $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); + $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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter195) + { + $xfer += $output->writeString($iter195); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partitions_ps_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::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_partitions_ps_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(); + $_size196 = 0; + $_etype199 = 0; + $xfer += $input->readListBegin($_etype199, $_size196); + for ($_i200 = 0; $_i200 < $_size196; ++$_i200) + { + $elem201 = null; + $elem201 = new metastore_Partition(); + $xfer += $elem201->read($input); + $this->success []= $elem201; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $iter202) + { + $xfer += $iter202->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(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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) { + 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::LST, + 'etype' => TType::STRING, + 'elem' => array( + '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['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_names_ps_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->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(); + $_size203 = 0; + $_etype206 = 0; + $xfer += $input->readListBegin($_etype206, $_size203); + for ($_i207 = 0; $_i207 < $_size203; ++$_i207) + { + $elem208 = null; + $xfer += $input->readString($elem208); + $this->part_vals []= $elem208; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $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); + $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('part_vals', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->part_vals)); + { + foreach ($this->part_vals as $iter209) + { + $xfer += $output->writeString($iter209); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partition_names_ps_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' => 'metastore_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_partition_names_ps_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(); + $_size210 = 0; + $_etype213 = 0; + $xfer += $input->readListBegin($_etype213, $_size210); + for ($_i214 = 0; $_i214 < $_size210; ++$_i214) + { + $elem215 = null; + $xfer += $input->readString($elem215); + $this->success []= $elem215; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $iter216) + { + $xfer += $output->writeString($iter216); + } + } + $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 metastore_ThriftHiveMetastore_get_partitions_by_filter_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $filter = null; + public $max_parts = -1; + + public function __construct($vals=null) { + 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' => 'filter', + '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['max_parts'])) { + $this->max_parts = $vals['max_parts']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_filter_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->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->filter); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I16) { + $xfer += $input->readI16($this->max_parts); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + 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->writeFieldEnd(); + } + if ($this->max_parts !== null) { + $xfer += $output->writeFieldBegin('max_parts', TType::I16, 4); + $xfer += $output->writeI16($this->max_parts); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_partitions_by_filter_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' => 'metastore_Partition', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_partitions_by_filter_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(); + $_size217 = 0; + $_etype220 = 0; + $xfer += $input->readListBegin($_etype220, $_size217); + for ($_i221 = 0; $_i221 < $_size217; ++$_i221) + { + $elem222 = null; + $elem222 = new metastore_Partition(); + $xfer += $elem222->read($input); + $this->success []= $elem222; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_partitions_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::STRUCT, count($this->success)); + { + foreach ($this->success as $iter223) + { + $xfer += $iter223->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, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_partition_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $new_part = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'new_part', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_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->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 metastore_Partition(); + $xfer += $this->new_part->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_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->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_alter_partition_result { + static $_TSPEC; + + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidOperationException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['o1'])) { + $this->o1 = $vals['o1']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_alter_partition_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 metastore_InvalidOperationException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_alter_partition_result'); + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_config_value_args { + static $_TSPEC; + + public $name = null; + public $defaultValue = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'defaultValue', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['defaultValue'])) { + $this->defaultValue = $vals['defaultValue']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_config_value_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::STRING) { + $xfer += $input->readString($this->defaultValue); + } 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_config_value_args'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->defaultValue !== null) { + $xfer += $output->writeFieldBegin('defaultValue', TType::STRING, 2); + $xfer += $output->writeString($this->defaultValue); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_config_value_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::STRING, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_ConfigValSecurityException', + ), + ); + } + 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_config_value_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::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_ConfigValSecurityException(); + $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_config_value_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $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 metastore_ThriftHiveMetastore_partition_name_to_vals_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_vals_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->part_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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_partition_name_to_vals_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' => 'metastore_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_partition_name_to_vals_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(); + $_size224 = 0; + $_etype227 = 0; + $xfer += $input->readListBegin($_etype227, $_size224); + for ($_i228 = 0; $_i228 < $_size224; ++$_i228) + { + $elem229 = null; + $xfer += $input->readString($elem229); + $this->success []= $elem229; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $iter230) + { + $xfer += $output->writeString($iter230); + } + } + $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 metastore_ThriftHiveMetastore_partition_name_to_spec_args { + static $_TSPEC; + + public $part_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'part_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['part_name'])) { + $this->part_name = $vals['part_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_partition_name_to_spec_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->part_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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_partition_name_to_spec_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::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' => 'metastore_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_partition_name_to_spec_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::MAP) { + $this->success = array(); + $_size231 = 0; + $_ktype232 = 0; + $_vtype233 = 0; + $xfer += $input->readMapBegin($_ktype232, $_vtype233, $_size231); + for ($_i235 = 0; $_i235 < $_size231; ++$_i235) + { + $key236 = ''; + $val237 = ''; + $xfer += $input->readString($key236); + $xfer += $input->readString($val237); + $this->success[$key236] = $val237; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_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_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 $kiter238 => $viter239) + { + $xfer += $output->writeString($kiter238); + $xfer += $output->writeString($viter239); + } + } + $output->writeMapEnd(); + } + $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 metastore_ThriftHiveMetastore_add_index_args { + static $_TSPEC; + + public $new_index = null; + public $index_table = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'new_index', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), + 2 => array( + 'var' => 'index_table', + 'type' => TType::STRUCT, + 'class' => 'metastore_Table', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['new_index'])) { + $this->new_index = $vals['new_index']; + } + if (isset($vals['index_table'])) { + $this->index_table = $vals['index_table']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_add_index_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->new_index = new metastore_Index(); + $xfer += $this->new_index->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->index_table = new metastore_Table(); + $xfer += $this->index_table->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_add_index_args'); + if ($this->new_index !== null) { + if (!is_object($this->new_index)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('new_index', TType::STRUCT, 1); + $xfer += $this->new_index->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_table !== null) { + if (!is_object($this->index_table)) { + 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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_add_index_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + public $o3 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_InvalidObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_AlreadyExistsException', + ), + 3 => array( + 'var' => 'o3', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_add_index_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 metastore_Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_InvalidObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_AlreadyExistsException(); + $xfer += $this->o2->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->o3 = new metastore_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_add_index_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $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 metastore_ThriftHiveMetastore_drop_index_by_name_args { + static $_TSPEC; + + 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' => '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['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_drop_index_by_name_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->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); + } + 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_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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_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::BOOL, + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_drop_index_by_name_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::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_drop_index_by_name_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->o1 !== null) { + $xfer += $output->writeFieldBegin('o1', TType::STRUCT, 1); + $xfer += $this->o1->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_index_by_name_args { + static $_TSPEC; + + public $db_name = null; + public $tbl_name = null; + public $index_name = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'index_name', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['db_name'])) { + $this->db_name = $vals['db_name']; + } + if (isset($vals['tbl_name'])) { + $this->tbl_name = $vals['tbl_name']; + } + if (isset($vals['index_name'])) { + $this->index_name = $vals['index_name']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_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->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; + 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_index_by_name_args'); + if ($this->db_name !== null) { + $xfer += $output->writeFieldBegin('db_name', TType::STRING, 1); + $xfer += $output->writeString($this->db_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->tbl_name !== null) { + $xfer += $output->writeFieldBegin('tbl_name', TType::STRING, 2); + $xfer += $output->writeString($this->tbl_name); + $xfer += $output->writeFieldEnd(); + } + if ($this->index_name !== null) { + $xfer += $output->writeFieldBegin('index_name', TType::STRING, 3); + $xfer += $output->writeString($this->index_name); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_index_by_name_result { + static $_TSPEC; + + public $success = null; + public $o1 = null; + public $o2 = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Index', + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_by_name_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 metastore_Index(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_MetaException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_NoSuchObjectException(); + $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_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); + $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 metastore_ThriftHiveMetastore_get_indexes_args { + static $_TSPEC; + + 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' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + '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['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_indexes_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->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::I16) { + $xfer += $input->readI16($this->max_indexes); + } 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_indexes_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->max_indexes !== null) { + $xfer += $output->writeFieldBegin('max_indexes', TType::I16, 3); + $xfer += $output->writeI16($this->max_indexes); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_indexes_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' => 'metastore_Index', + ), + ), + 1 => array( + 'var' => 'o1', + 'type' => TType::STRUCT, + 'class' => 'metastore_NoSuchObjectException', + ), + 2 => array( + 'var' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_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_indexes_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size240 = 0; + $_etype243 = 0; + $xfer += $input->readListBegin($_etype243, $_size240); + for ($_i244 = 0; $_i244 < $_size240; ++$_i244) + { + $elem245 = null; + $elem245 = new metastore_Index(); + $xfer += $elem245->read($input); + $this->success []= $elem245; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o1 = new metastore_NoSuchObjectException(); + $xfer += $this->o1->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_indexes_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter246) + { + $xfer += $iter246->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, 2); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_index_names_args { + static $_TSPEC; + + 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' => 'db_name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'tbl_name', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'max_indexes', + '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['max_indexes'])) { + $this->max_indexes = $vals['max_indexes']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_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->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::I16) { + $xfer += $input->readI16($this->max_indexes); + } 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_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->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(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_ThriftHiveMetastore_get_index_names_result { + static $_TSPEC; + + public $success = 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' => 'o2', + 'type' => TType::STRUCT, + 'class' => 'metastore_MetaException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['o2'])) { + $this->o2 = $vals['o2']; + } + } + } + + public function getName() { + return 'ThriftHiveMetastore_get_index_names_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(); + $_size247 = 0; + $_etype250 = 0; + $xfer += $input->readListBegin($_etype250, $_size247); + for ($_i251 = 0; $_i251 < $_size247; ++$_i251) + { + $elem252 = null; + $xfer += $input->readString($elem252); + $this->success []= $elem252; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->o2 = new metastore_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_index_names_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter253) + { + $xfer += $output->writeString($iter253); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->o2 !== null) { + $xfer += $output->writeFieldBegin('o2', TType::STRUCT, 1); + $xfer += $this->o2->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git metastore/src/gen-php/hive_metastore/hive_metastore_constants.php metastore/src/gen-php/hive_metastore/hive_metastore_constants.php new file mode 100644 index 0000000..5daa79a --- /dev/null +++ metastore/src/gen-php/hive_metastore/hive_metastore_constants.php @@ -0,0 +1,43 @@ + diff --git metastore/src/gen-php/hive_metastore/hive_metastore_types.php metastore/src/gen-php/hive_metastore/hive_metastore_types.php new file mode 100644 index 0000000..1d5f4b4 --- /dev/null +++ metastore/src/gen-php/hive_metastore/hive_metastore_types.php @@ -0,0 +1,2807 @@ + array( + 'var' => 'version', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'comments', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + if (isset($vals['comments'])) { + $this->comments = $vals['comments']; + } + } + } + + public function getName() { + return 'Version'; + } + + 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->version); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comments); + } 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('Version'); + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::STRING, 1); + $xfer += $output->writeString($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->comments !== null) { + $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); + $xfer += $output->writeString($this->comments); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_FieldSchema { + static $_TSPEC; + + public $name = null; + public $type = null; + public $comment = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'comment', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type'])) { + $this->type = $vals['type']; + } + if (isset($vals['comment'])) { + $this->comment = $vals['comment']; + } + } + } + + public function getName() { + return 'FieldSchema'; + } + + 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::STRING) { + $xfer += $input->readString($this->type); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->comment); + } 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('FieldSchema'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type !== null) { + $xfer += $output->writeFieldBegin('type', TType::STRING, 2); + $xfer += $output->writeString($this->type); + $xfer += $output->writeFieldEnd(); + } + if ($this->comment !== null) { + $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); + $xfer += $output->writeString($this->comment); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Type { + static $_TSPEC; + + public $name = null; + public $type1 = null; + public $type2 = null; + public $fields = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'type1', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'type2', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'fields', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['type1'])) { + $this->type1 = $vals['type1']; + } + if (isset($vals['type2'])) { + $this->type2 = $vals['type2']; + } + if (isset($vals['fields'])) { + $this->fields = $vals['fields']; + } + } + } + + public function getName() { + return 'Type'; + } + + 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::STRING) { + $xfer += $input->readString($this->type1); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->type2); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->fields = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $elem5 = new metastore_FieldSchema(); + $xfer += $elem5->read($input); + $this->fields []= $elem5; + } + $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('Type'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->type1 !== null) { + $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); + $xfer += $output->writeString($this->type1); + $xfer += $output->writeFieldEnd(); + } + if ($this->type2 !== null) { + $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); + $xfer += $output->writeString($this->type2); + $xfer += $output->writeFieldEnd(); + } + if ($this->fields !== null) { + if (!is_array($this->fields)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fields', TType::LST, 4); + { + $output->writeListBegin(TType::STRUCT, count($this->fields)); + { + foreach ($this->fields as $iter6) + { + $xfer += $iter6->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Database { + static $_TSPEC; + + public $name = null; + public $description = null; + public $locationUri = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'description', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'locationUri', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['description'])) { + $this->description = $vals['description']; + } + if (isset($vals['locationUri'])) { + $this->locationUri = $vals['locationUri']; + } + } + } + + public function getName() { + return 'Database'; + } + + 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::STRING) { + $xfer += $input->readString($this->description); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->locationUri); + } 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('Database'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->description !== null) { + $xfer += $output->writeFieldBegin('description', TType::STRING, 2); + $xfer += $output->writeString($this->description); + $xfer += $output->writeFieldEnd(); + } + if ($this->locationUri !== null) { + $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); + $xfer += $output->writeString($this->locationUri); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_SerDeInfo { + static $_TSPEC; + + public $name = null; + public $serializationLib = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'serializationLib', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['serializationLib'])) { + $this->serializationLib = $vals['serializationLib']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'SerDeInfo'; + } + + 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::STRING) { + $xfer += $input->readString($this->serializationLib); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size7 = 0; + $_ktype8 = 0; + $_vtype9 = 0; + $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $key12 = ''; + $val13 = ''; + $xfer += $input->readString($key12); + $xfer += $input->readString($val13); + $this->parameters[$key12] = $val13; + } + $xfer += $input->readMapEnd(); + } 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('SerDeInfo'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->serializationLib !== null) { + $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); + $xfer += $output->writeString($this->serializationLib); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter14 => $viter15) + { + $xfer += $output->writeString($kiter14); + $xfer += $output->writeString($viter15); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Order { + static $_TSPEC; + + public $col = null; + public $order = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'col', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'order', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['col'])) { + $this->col = $vals['col']; + } + if (isset($vals['order'])) { + $this->order = $vals['order']; + } + } + } + + public function getName() { + return 'Order'; + } + + 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->col); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->order); + } 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('Order'); + if ($this->col !== null) { + $xfer += $output->writeFieldBegin('col', TType::STRING, 1); + $xfer += $output->writeString($this->col); + $xfer += $output->writeFieldEnd(); + } + if ($this->order !== null) { + $xfer += $output->writeFieldBegin('order', TType::I32, 2); + $xfer += $output->writeI32($this->order); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_StorageDescriptor { + static $_TSPEC; + + public $cols = null; + public $location = null; + public $inputFormat = null; + public $outputFormat = null; + public $compressed = null; + public $numBuckets = null; + public $serdeInfo = null; + public $bucketCols = null; + public $sortCols = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'cols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 2 => array( + 'var' => 'location', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'inputFormat', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'outputFormat', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'compressed', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'numBuckets', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'serdeInfo', + 'type' => TType::STRUCT, + 'class' => 'metastore_SerDeInfo', + ), + 8 => array( + 'var' => 'bucketCols', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 9 => array( + 'var' => 'sortCols', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_Order', + ), + ), + 10 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['cols'])) { + $this->cols = $vals['cols']; + } + if (isset($vals['location'])) { + $this->location = $vals['location']; + } + if (isset($vals['inputFormat'])) { + $this->inputFormat = $vals['inputFormat']; + } + if (isset($vals['outputFormat'])) { + $this->outputFormat = $vals['outputFormat']; + } + if (isset($vals['compressed'])) { + $this->compressed = $vals['compressed']; + } + if (isset($vals['numBuckets'])) { + $this->numBuckets = $vals['numBuckets']; + } + if (isset($vals['serdeInfo'])) { + $this->serdeInfo = $vals['serdeInfo']; + } + if (isset($vals['bucketCols'])) { + $this->bucketCols = $vals['bucketCols']; + } + if (isset($vals['sortCols'])) { + $this->sortCols = $vals['sortCols']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'StorageDescriptor'; + } + + 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::LST) { + $this->cols = array(); + $_size16 = 0; + $_etype19 = 0; + $xfer += $input->readListBegin($_etype19, $_size16); + for ($_i20 = 0; $_i20 < $_size16; ++$_i20) + { + $elem21 = null; + $elem21 = new metastore_FieldSchema(); + $xfer += $elem21->read($input); + $this->cols []= $elem21; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->location); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->inputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->outputFormat); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->compressed); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numBuckets); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->serdeInfo = new metastore_SerDeInfo(); + $xfer += $this->serdeInfo->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->bucketCols = array(); + $_size22 = 0; + $_etype25 = 0; + $xfer += $input->readListBegin($_etype25, $_size22); + for ($_i26 = 0; $_i26 < $_size22; ++$_i26) + { + $elem27 = null; + $xfer += $input->readString($elem27); + $this->bucketCols []= $elem27; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::LST) { + $this->sortCols = array(); + $_size28 = 0; + $_etype31 = 0; + $xfer += $input->readListBegin($_etype31, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $elem33 = null; + $elem33 = new metastore_Order(); + $xfer += $elem33->read($input); + $this->sortCols []= $elem33; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size34 = 0; + $_ktype35 = 0; + $_vtype36 = 0; + $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); + for ($_i38 = 0; $_i38 < $_size34; ++$_i38) + { + $key39 = ''; + $val40 = ''; + $xfer += $input->readString($key39); + $xfer += $input->readString($val40); + $this->parameters[$key39] = $val40; + } + $xfer += $input->readMapEnd(); + } 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('StorageDescriptor'); + if ($this->cols !== null) { + if (!is_array($this->cols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('cols', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->cols)); + { + foreach ($this->cols as $iter41) + { + $xfer += $iter41->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->location !== null) { + $xfer += $output->writeFieldBegin('location', TType::STRING, 2); + $xfer += $output->writeString($this->location); + $xfer += $output->writeFieldEnd(); + } + if ($this->inputFormat !== null) { + $xfer += $output->writeFieldBegin('inputFormat', TType::STRING, 3); + $xfer += $output->writeString($this->inputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->outputFormat !== null) { + $xfer += $output->writeFieldBegin('outputFormat', TType::STRING, 4); + $xfer += $output->writeString($this->outputFormat); + $xfer += $output->writeFieldEnd(); + } + if ($this->compressed !== null) { + $xfer += $output->writeFieldBegin('compressed', TType::BOOL, 5); + $xfer += $output->writeBool($this->compressed); + $xfer += $output->writeFieldEnd(); + } + if ($this->numBuckets !== null) { + $xfer += $output->writeFieldBegin('numBuckets', TType::I32, 6); + $xfer += $output->writeI32($this->numBuckets); + $xfer += $output->writeFieldEnd(); + } + if ($this->serdeInfo !== null) { + if (!is_object($this->serdeInfo)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('serdeInfo', TType::STRUCT, 7); + $xfer += $this->serdeInfo->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->bucketCols !== null) { + if (!is_array($this->bucketCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('bucketCols', TType::LST, 8); + { + $output->writeListBegin(TType::STRING, count($this->bucketCols)); + { + foreach ($this->bucketCols as $iter42) + { + $xfer += $output->writeString($iter42); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->sortCols !== null) { + if (!is_array($this->sortCols)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sortCols', TType::LST, 9); + { + $output->writeListBegin(TType::STRUCT, count($this->sortCols)); + { + foreach ($this->sortCols as $iter43) + { + $xfer += $iter43->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter44 => $viter45) + { + $xfer += $output->writeString($kiter44); + $xfer += $output->writeString($viter45); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Table { + static $_TSPEC; + + public $tableName = null; + public $dbName = null; + public $owner = null; + public $createTime = null; + public $lastAccessTime = null; + public $retention = null; + public $sd = null; + public $partitionKeys = null; + public $parameters = null; + public $viewOriginalText = null; + public $viewExpandedText = null; + public $tableType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'owner', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'retention', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => 'metastore_StorageDescriptor', + ), + 8 => array( + 'var' => 'partitionKeys', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'viewOriginalText', + 'type' => TType::STRING, + ), + 11 => array( + 'var' => 'viewExpandedText', + 'type' => TType::STRING, + ), + 12 => array( + 'var' => 'tableType', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['owner'])) { + $this->owner = $vals['owner']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['retention'])) { + $this->retention = $vals['retention']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['partitionKeys'])) { + $this->partitionKeys = $vals['partitionKeys']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['viewOriginalText'])) { + $this->viewOriginalText = $vals['viewOriginalText']; + } + if (isset($vals['viewExpandedText'])) { + $this->viewExpandedText = $vals['viewExpandedText']; + } + if (isset($vals['tableType'])) { + $this->tableType = $vals['tableType']; + } + } + } + + public function getName() { + return 'Table'; + } + + 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->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->owner); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->retention); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRUCT) { + $this->sd = new metastore_StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::LST) { + $this->partitionKeys = array(); + $_size46 = 0; + $_etype49 = 0; + $xfer += $input->readListBegin($_etype49, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $elem51 = null; + $elem51 = new metastore_FieldSchema(); + $xfer += $elem51->read($input); + $this->partitionKeys []= $elem51; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size52 = 0; + $_ktype53 = 0; + $_vtype54 = 0; + $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52); + for ($_i56 = 0; $_i56 < $_size52; ++$_i56) + { + $key57 = ''; + $val58 = ''; + $xfer += $input->readString($key57); + $xfer += $input->readString($val58); + $this->parameters[$key57] = $val58; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewOriginalText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 11: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->viewExpandedText); + } else { + $xfer += $input->skip($ftype); + } + break; + case 12: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableType); + } 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('Table'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->owner !== null) { + $xfer += $output->writeFieldBegin('owner', TType::STRING, 3); + $xfer += $output->writeString($this->owner); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->retention !== null) { + $xfer += $output->writeFieldBegin('retention', TType::I32, 6); + $xfer += $output->writeI32($this->retention); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->partitionKeys !== null) { + if (!is_array($this->partitionKeys)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8); + { + $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); + { + foreach ($this->partitionKeys as $iter59) + { + $xfer += $iter59->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter60 => $viter61) + { + $xfer += $output->writeString($kiter60); + $xfer += $output->writeString($viter61); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->viewOriginalText !== null) { + $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10); + $xfer += $output->writeString($this->viewOriginalText); + $xfer += $output->writeFieldEnd(); + } + if ($this->viewExpandedText !== null) { + $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11); + $xfer += $output->writeString($this->viewExpandedText); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableType !== null) { + $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12); + $xfer += $output->writeString($this->tableType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Partition { + static $_TSPEC; + + public $values = null; + public $dbName = null; + public $tableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $sd = null; + public $parameters = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'values', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 2 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => 'metastore_StorageDescriptor', + ), + 7 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['values'])) { + $this->values = $vals['values']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + } + } + + public function getName() { + return 'Partition'; + } + + 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::LST) { + $this->values = array(); + $_size62 = 0; + $_etype65 = 0; + $xfer += $input->readListBegin($_etype65, $_size62); + for ($_i66 = 0; $_i66 < $_size62; ++$_i66) + { + $elem67 = null; + $xfer += $input->readString($elem67); + $this->values []= $elem67; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRUCT) { + $this->sd = new metastore_StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size68 = 0; + $_ktype69 = 0; + $_vtype70 = 0; + $xfer += $input->readMapBegin($_ktype69, $_vtype70, $_size68); + for ($_i72 = 0; $_i72 < $_size68; ++$_i72) + { + $key73 = ''; + $val74 = ''; + $xfer += $input->readString($key73); + $xfer += $input->readString($val74); + $this->parameters[$key73] = $val74; + } + $xfer += $input->readMapEnd(); + } 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('Partition'); + if ($this->values !== null) { + if (!is_array($this->values)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('values', TType::LST, 1); + { + $output->writeListBegin(TType::STRING, count($this->values)); + { + foreach ($this->values as $iter75) + { + $xfer += $output->writeString($iter75); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 6); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 7); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter76 => $viter77) + { + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Index { + static $_TSPEC; + + public $indexName = null; + public $indexHandlerClass = null; + public $dbName = null; + public $origTableName = null; + public $createTime = null; + public $lastAccessTime = null; + public $indexTableName = null; + public $sd = null; + public $parameters = null; + public $deferredRebuild = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'indexName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'indexHandlerClass', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'dbName', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'origTableName', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'createTime', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'lastAccessTime', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'indexTableName', + 'type' => TType::STRING, + ), + 8 => array( + 'var' => 'sd', + 'type' => TType::STRUCT, + 'class' => 'metastore_StorageDescriptor', + ), + 9 => array( + 'var' => 'parameters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 10 => array( + 'var' => 'deferredRebuild', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['indexName'])) { + $this->indexName = $vals['indexName']; + } + if (isset($vals['indexHandlerClass'])) { + $this->indexHandlerClass = $vals['indexHandlerClass']; + } + if (isset($vals['dbName'])) { + $this->dbName = $vals['dbName']; + } + if (isset($vals['origTableName'])) { + $this->origTableName = $vals['origTableName']; + } + if (isset($vals['createTime'])) { + $this->createTime = $vals['createTime']; + } + if (isset($vals['lastAccessTime'])) { + $this->lastAccessTime = $vals['lastAccessTime']; + } + if (isset($vals['indexTableName'])) { + $this->indexTableName = $vals['indexTableName']; + } + if (isset($vals['sd'])) { + $this->sd = $vals['sd']; + } + if (isset($vals['parameters'])) { + $this->parameters = $vals['parameters']; + } + if (isset($vals['deferredRebuild'])) { + $this->deferredRebuild = $vals['deferredRebuild']; + } + } + } + + public function getName() { + return 'Index'; + } + + 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->indexName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexHandlerClass); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->dbName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->origTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->createTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->lastAccessTime); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->indexTableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::STRUCT) { + $this->sd = new metastore_StorageDescriptor(); + $xfer += $this->sd->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::MAP) { + $this->parameters = array(); + $_size78 = 0; + $_ktype79 = 0; + $_vtype80 = 0; + $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $key83 = ''; + $val84 = ''; + $xfer += $input->readString($key83); + $xfer += $input->readString($val84); + $this->parameters[$key83] = $val84; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 10: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->deferredRebuild); + } 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('Index'); + if ($this->indexName !== null) { + $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); + $xfer += $output->writeString($this->indexName); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexHandlerClass !== null) { + $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); + $xfer += $output->writeString($this->indexHandlerClass); + $xfer += $output->writeFieldEnd(); + } + if ($this->dbName !== null) { + $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); + $xfer += $output->writeString($this->dbName); + $xfer += $output->writeFieldEnd(); + } + if ($this->origTableName !== null) { + $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); + $xfer += $output->writeString($this->origTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->createTime !== null) { + $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); + $xfer += $output->writeI32($this->createTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->lastAccessTime !== null) { + $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); + $xfer += $output->writeI32($this->lastAccessTime); + $xfer += $output->writeFieldEnd(); + } + if ($this->indexTableName !== null) { + $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); + $xfer += $output->writeString($this->indexTableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->sd !== null) { + if (!is_object($this->sd)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); + $xfer += $this->sd->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->parameters !== null) { + if (!is_array($this->parameters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); + { + foreach ($this->parameters as $kiter85 => $viter86) + { + $xfer += $output->writeString($kiter85); + $xfer += $output->writeString($viter86); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->deferredRebuild !== null) { + $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); + $xfer += $output->writeBool($this->deferredRebuild); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_Schema { + static $_TSPEC; + + public $fieldSchemas = null; + public $properties = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'fieldSchemas', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'metastore_FieldSchema', + ), + ), + 2 => array( + 'var' => 'properties', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['fieldSchemas'])) { + $this->fieldSchemas = $vals['fieldSchemas']; + } + if (isset($vals['properties'])) { + $this->properties = $vals['properties']; + } + } + } + + public function getName() { + return 'Schema'; + } + + 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::LST) { + $this->fieldSchemas = array(); + $_size87 = 0; + $_etype90 = 0; + $xfer += $input->readListBegin($_etype90, $_size87); + for ($_i91 = 0; $_i91 < $_size87; ++$_i91) + { + $elem92 = null; + $elem92 = new metastore_FieldSchema(); + $xfer += $elem92->read($input); + $this->fieldSchemas []= $elem92; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->properties = array(); + $_size93 = 0; + $_ktype94 = 0; + $_vtype95 = 0; + $xfer += $input->readMapBegin($_ktype94, $_vtype95, $_size93); + for ($_i97 = 0; $_i97 < $_size93; ++$_i97) + { + $key98 = ''; + $val99 = ''; + $xfer += $input->readString($key98); + $xfer += $input->readString($val99); + $this->properties[$key98] = $val99; + } + $xfer += $input->readMapEnd(); + } 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('Schema'); + if ($this->fieldSchemas !== null) { + if (!is_array($this->fieldSchemas)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); + { + foreach ($this->fieldSchemas as $iter100) + { + $xfer += $iter100->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->properties !== null) { + if (!is_array($this->properties)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); + { + foreach ($this->properties as $kiter101 => $viter102) + { + $xfer += $output->writeString($kiter101); + $xfer += $output->writeString($viter102); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class metastore_MetaException 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 'MetaException'; + } + + 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('MetaException'); + 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; + } + +} + +class metastore_UnknownTableException 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 'UnknownTableException'; + } + + 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('UnknownTableException'); + 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; + } + +} + +class metastore_UnknownDBException 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 'UnknownDBException'; + } + + 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('UnknownDBException'); + 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; + } + +} + +class metastore_AlreadyExistsException 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 'AlreadyExistsException'; + } + + 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('AlreadyExistsException'); + 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; + } + +} + +class metastore_InvalidObjectException 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 'InvalidObjectException'; + } + + 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('InvalidObjectException'); + 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; + } + +} + +class metastore_NoSuchObjectException 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 'NoSuchObjectException'; + } + + 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('NoSuchObjectException'); + 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; + } + +} + +class metastore_IndexAlreadyExistsException 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 'IndexAlreadyExistsException'; + } + + 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('IndexAlreadyExistsException'); + 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; + } + +} + +class metastore_InvalidOperationException 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 'InvalidOperationException'; + } + + 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('InvalidOperationException'); + 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; + } + +} + +class metastore_ConfigValSecurityException 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 'ConfigValSecurityException'; + } + + 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('ConfigValSecurityException'); + 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-php/hive_metastore_constants.php metastore/src/gen-php/hive_metastore_constants.php deleted file mode 100644 index 5daa79a..0000000 --- metastore/src/gen-php/hive_metastore_constants.php +++ /dev/null @@ -1,43 +0,0 @@ - diff --git metastore/src/gen-php/hive_metastore_types.php metastore/src/gen-php/hive_metastore_types.php deleted file mode 100644 index 1d5f4b4..0000000 --- metastore/src/gen-php/hive_metastore_types.php +++ /dev/null @@ -1,2807 +0,0 @@ - array( - 'var' => 'version', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'comments', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['version'])) { - $this->version = $vals['version']; - } - if (isset($vals['comments'])) { - $this->comments = $vals['comments']; - } - } - } - - public function getName() { - return 'Version'; - } - - 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->version); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->comments); - } 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('Version'); - if ($this->version !== null) { - $xfer += $output->writeFieldBegin('version', TType::STRING, 1); - $xfer += $output->writeString($this->version); - $xfer += $output->writeFieldEnd(); - } - if ($this->comments !== null) { - $xfer += $output->writeFieldBegin('comments', TType::STRING, 2); - $xfer += $output->writeString($this->comments); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_FieldSchema { - static $_TSPEC; - - public $name = null; - public $type = null; - public $comment = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'type', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'comment', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['type'])) { - $this->type = $vals['type']; - } - if (isset($vals['comment'])) { - $this->comment = $vals['comment']; - } - } - } - - public function getName() { - return 'FieldSchema'; - } - - 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::STRING) { - $xfer += $input->readString($this->type); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->comment); - } 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('FieldSchema'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->type !== null) { - $xfer += $output->writeFieldBegin('type', TType::STRING, 2); - $xfer += $output->writeString($this->type); - $xfer += $output->writeFieldEnd(); - } - if ($this->comment !== null) { - $xfer += $output->writeFieldBegin('comment', TType::STRING, 3); - $xfer += $output->writeString($this->comment); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Type { - static $_TSPEC; - - public $name = null; - public $type1 = null; - public $type2 = null; - public $fields = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'type1', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'type2', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'fields', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['type1'])) { - $this->type1 = $vals['type1']; - } - if (isset($vals['type2'])) { - $this->type2 = $vals['type2']; - } - if (isset($vals['fields'])) { - $this->fields = $vals['fields']; - } - } - } - - public function getName() { - return 'Type'; - } - - 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::STRING) { - $xfer += $input->readString($this->type1); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->type2); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::LST) { - $this->fields = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $elem5 = new metastore_FieldSchema(); - $xfer += $elem5->read($input); - $this->fields []= $elem5; - } - $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('Type'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->type1 !== null) { - $xfer += $output->writeFieldBegin('type1', TType::STRING, 2); - $xfer += $output->writeString($this->type1); - $xfer += $output->writeFieldEnd(); - } - if ($this->type2 !== null) { - $xfer += $output->writeFieldBegin('type2', TType::STRING, 3); - $xfer += $output->writeString($this->type2); - $xfer += $output->writeFieldEnd(); - } - if ($this->fields !== null) { - if (!is_array($this->fields)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fields', TType::LST, 4); - { - $output->writeListBegin(TType::STRUCT, count($this->fields)); - { - foreach ($this->fields as $iter6) - { - $xfer += $iter6->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Database { - static $_TSPEC; - - public $name = null; - public $description = null; - public $locationUri = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'description', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'locationUri', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['description'])) { - $this->description = $vals['description']; - } - if (isset($vals['locationUri'])) { - $this->locationUri = $vals['locationUri']; - } - } - } - - public function getName() { - return 'Database'; - } - - 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::STRING) { - $xfer += $input->readString($this->description); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->locationUri); - } 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('Database'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->description !== null) { - $xfer += $output->writeFieldBegin('description', TType::STRING, 2); - $xfer += $output->writeString($this->description); - $xfer += $output->writeFieldEnd(); - } - if ($this->locationUri !== null) { - $xfer += $output->writeFieldBegin('locationUri', TType::STRING, 3); - $xfer += $output->writeString($this->locationUri); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_SerDeInfo { - static $_TSPEC; - - public $name = null; - public $serializationLib = null; - public $parameters = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'name', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'serializationLib', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['name'])) { - $this->name = $vals['name']; - } - if (isset($vals['serializationLib'])) { - $this->serializationLib = $vals['serializationLib']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - } - } - - public function getName() { - return 'SerDeInfo'; - } - - 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::STRING) { - $xfer += $input->readString($this->serializationLib); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size7 = 0; - $_ktype8 = 0; - $_vtype9 = 0; - $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) - { - $key12 = ''; - $val13 = ''; - $xfer += $input->readString($key12); - $xfer += $input->readString($val13); - $this->parameters[$key12] = $val13; - } - $xfer += $input->readMapEnd(); - } 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('SerDeInfo'); - if ($this->name !== null) { - $xfer += $output->writeFieldBegin('name', TType::STRING, 1); - $xfer += $output->writeString($this->name); - $xfer += $output->writeFieldEnd(); - } - if ($this->serializationLib !== null) { - $xfer += $output->writeFieldBegin('serializationLib', TType::STRING, 2); - $xfer += $output->writeString($this->serializationLib); - $xfer += $output->writeFieldEnd(); - } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter14 => $viter15) - { - $xfer += $output->writeString($kiter14); - $xfer += $output->writeString($viter15); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Order { - static $_TSPEC; - - public $col = null; - public $order = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'col', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'order', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['col'])) { - $this->col = $vals['col']; - } - if (isset($vals['order'])) { - $this->order = $vals['order']; - } - } - } - - public function getName() { - return 'Order'; - } - - 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->col); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->order); - } 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('Order'); - if ($this->col !== null) { - $xfer += $output->writeFieldBegin('col', TType::STRING, 1); - $xfer += $output->writeString($this->col); - $xfer += $output->writeFieldEnd(); - } - if ($this->order !== null) { - $xfer += $output->writeFieldBegin('order', TType::I32, 2); - $xfer += $output->writeI32($this->order); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_StorageDescriptor { - static $_TSPEC; - - public $cols = null; - public $location = null; - public $inputFormat = null; - public $outputFormat = null; - public $compressed = null; - public $numBuckets = null; - public $serdeInfo = null; - public $bucketCols = null; - public $sortCols = null; - public $parameters = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'cols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), - 2 => array( - 'var' => 'location', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'inputFormat', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'outputFormat', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'compressed', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'numBuckets', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'serdeInfo', - 'type' => TType::STRUCT, - 'class' => 'metastore_SerDeInfo', - ), - 8 => array( - 'var' => 'bucketCols', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 9 => array( - 'var' => 'sortCols', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_Order', - ), - ), - 10 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['cols'])) { - $this->cols = $vals['cols']; - } - if (isset($vals['location'])) { - $this->location = $vals['location']; - } - if (isset($vals['inputFormat'])) { - $this->inputFormat = $vals['inputFormat']; - } - if (isset($vals['outputFormat'])) { - $this->outputFormat = $vals['outputFormat']; - } - if (isset($vals['compressed'])) { - $this->compressed = $vals['compressed']; - } - if (isset($vals['numBuckets'])) { - $this->numBuckets = $vals['numBuckets']; - } - if (isset($vals['serdeInfo'])) { - $this->serdeInfo = $vals['serdeInfo']; - } - if (isset($vals['bucketCols'])) { - $this->bucketCols = $vals['bucketCols']; - } - if (isset($vals['sortCols'])) { - $this->sortCols = $vals['sortCols']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - } - } - - public function getName() { - return 'StorageDescriptor'; - } - - 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::LST) { - $this->cols = array(); - $_size16 = 0; - $_etype19 = 0; - $xfer += $input->readListBegin($_etype19, $_size16); - for ($_i20 = 0; $_i20 < $_size16; ++$_i20) - { - $elem21 = null; - $elem21 = new metastore_FieldSchema(); - $xfer += $elem21->read($input); - $this->cols []= $elem21; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->location); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->inputFormat); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->outputFormat); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->compressed); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->numBuckets); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRUCT) { - $this->serdeInfo = new metastore_SerDeInfo(); - $xfer += $this->serdeInfo->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::LST) { - $this->bucketCols = array(); - $_size22 = 0; - $_etype25 = 0; - $xfer += $input->readListBegin($_etype25, $_size22); - for ($_i26 = 0; $_i26 < $_size22; ++$_i26) - { - $elem27 = null; - $xfer += $input->readString($elem27); - $this->bucketCols []= $elem27; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::LST) { - $this->sortCols = array(); - $_size28 = 0; - $_etype31 = 0; - $xfer += $input->readListBegin($_etype31, $_size28); - for ($_i32 = 0; $_i32 < $_size28; ++$_i32) - { - $elem33 = null; - $elem33 = new metastore_Order(); - $xfer += $elem33->read($input); - $this->sortCols []= $elem33; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size34 = 0; - $_ktype35 = 0; - $_vtype36 = 0; - $xfer += $input->readMapBegin($_ktype35, $_vtype36, $_size34); - for ($_i38 = 0; $_i38 < $_size34; ++$_i38) - { - $key39 = ''; - $val40 = ''; - $xfer += $input->readString($key39); - $xfer += $input->readString($val40); - $this->parameters[$key39] = $val40; - } - $xfer += $input->readMapEnd(); - } 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('StorageDescriptor'); - if ($this->cols !== null) { - if (!is_array($this->cols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('cols', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->cols)); - { - foreach ($this->cols as $iter41) - { - $xfer += $iter41->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->location !== null) { - $xfer += $output->writeFieldBegin('location', TType::STRING, 2); - $xfer += $output->writeString($this->location); - $xfer += $output->writeFieldEnd(); - } - if ($this->inputFormat !== null) { - $xfer += $output->writeFieldBegin('inputFormat', TType::STRING, 3); - $xfer += $output->writeString($this->inputFormat); - $xfer += $output->writeFieldEnd(); - } - if ($this->outputFormat !== null) { - $xfer += $output->writeFieldBegin('outputFormat', TType::STRING, 4); - $xfer += $output->writeString($this->outputFormat); - $xfer += $output->writeFieldEnd(); - } - if ($this->compressed !== null) { - $xfer += $output->writeFieldBegin('compressed', TType::BOOL, 5); - $xfer += $output->writeBool($this->compressed); - $xfer += $output->writeFieldEnd(); - } - if ($this->numBuckets !== null) { - $xfer += $output->writeFieldBegin('numBuckets', TType::I32, 6); - $xfer += $output->writeI32($this->numBuckets); - $xfer += $output->writeFieldEnd(); - } - if ($this->serdeInfo !== null) { - if (!is_object($this->serdeInfo)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('serdeInfo', TType::STRUCT, 7); - $xfer += $this->serdeInfo->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->bucketCols !== null) { - if (!is_array($this->bucketCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('bucketCols', TType::LST, 8); - { - $output->writeListBegin(TType::STRING, count($this->bucketCols)); - { - foreach ($this->bucketCols as $iter42) - { - $xfer += $output->writeString($iter42); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->sortCols !== null) { - if (!is_array($this->sortCols)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('sortCols', TType::LST, 9); - { - $output->writeListBegin(TType::STRUCT, count($this->sortCols)); - { - foreach ($this->sortCols as $iter43) - { - $xfer += $iter43->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 10); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter44 => $viter45) - { - $xfer += $output->writeString($kiter44); - $xfer += $output->writeString($viter45); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Table { - static $_TSPEC; - - public $tableName = null; - public $dbName = null; - public $owner = null; - public $createTime = null; - public $lastAccessTime = null; - public $retention = null; - public $sd = null; - public $partitionKeys = null; - public $parameters = null; - public $viewOriginalText = null; - public $viewExpandedText = null; - public $tableType = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'owner', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'createTime', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'lastAccessTime', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'retention', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'sd', - 'type' => TType::STRUCT, - 'class' => 'metastore_StorageDescriptor', - ), - 8 => array( - 'var' => 'partitionKeys', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), - 9 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 10 => array( - 'var' => 'viewOriginalText', - 'type' => TType::STRING, - ), - 11 => array( - 'var' => 'viewExpandedText', - 'type' => TType::STRING, - ), - 12 => array( - 'var' => 'tableType', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['owner'])) { - $this->owner = $vals['owner']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['retention'])) { - $this->retention = $vals['retention']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; - } - if (isset($vals['partitionKeys'])) { - $this->partitionKeys = $vals['partitionKeys']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - if (isset($vals['viewOriginalText'])) { - $this->viewOriginalText = $vals['viewOriginalText']; - } - if (isset($vals['viewExpandedText'])) { - $this->viewExpandedText = $vals['viewExpandedText']; - } - if (isset($vals['tableType'])) { - $this->tableType = $vals['tableType']; - } - } - } - - public function getName() { - return 'Table'; - } - - 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->dbName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->owner); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->createTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->lastAccessTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->retention); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRUCT) { - $this->sd = new metastore_StorageDescriptor(); - $xfer += $this->sd->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::LST) { - $this->partitionKeys = array(); - $_size46 = 0; - $_etype49 = 0; - $xfer += $input->readListBegin($_etype49, $_size46); - for ($_i50 = 0; $_i50 < $_size46; ++$_i50) - { - $elem51 = null; - $elem51 = new metastore_FieldSchema(); - $xfer += $elem51->read($input); - $this->partitionKeys []= $elem51; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size52 = 0; - $_ktype53 = 0; - $_vtype54 = 0; - $xfer += $input->readMapBegin($_ktype53, $_vtype54, $_size52); - for ($_i56 = 0; $_i56 < $_size52; ++$_i56) - { - $key57 = ''; - $val58 = ''; - $xfer += $input->readString($key57); - $xfer += $input->readString($val58); - $this->parameters[$key57] = $val58; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->viewOriginalText); - } else { - $xfer += $input->skip($ftype); - } - break; - case 11: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->viewExpandedText); - } else { - $xfer += $input->skip($ftype); - } - break; - case 12: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tableType); - } 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('Table'); - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->owner !== null) { - $xfer += $output->writeFieldBegin('owner', TType::STRING, 3); - $xfer += $output->writeString($this->owner); - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); - $xfer += $output->writeI32($this->createTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->retention !== null) { - $xfer += $output->writeFieldBegin('retention', TType::I32, 6); - $xfer += $output->writeI32($this->retention); - $xfer += $output->writeFieldEnd(); - } - if ($this->sd !== null) { - if (!is_object($this->sd)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 7); - $xfer += $this->sd->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->partitionKeys !== null) { - if (!is_array($this->partitionKeys)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('partitionKeys', TType::LST, 8); - { - $output->writeListBegin(TType::STRUCT, count($this->partitionKeys)); - { - foreach ($this->partitionKeys as $iter59) - { - $xfer += $iter59->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter60 => $viter61) - { - $xfer += $output->writeString($kiter60); - $xfer += $output->writeString($viter61); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->viewOriginalText !== null) { - $xfer += $output->writeFieldBegin('viewOriginalText', TType::STRING, 10); - $xfer += $output->writeString($this->viewOriginalText); - $xfer += $output->writeFieldEnd(); - } - if ($this->viewExpandedText !== null) { - $xfer += $output->writeFieldBegin('viewExpandedText', TType::STRING, 11); - $xfer += $output->writeString($this->viewExpandedText); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableType !== null) { - $xfer += $output->writeFieldBegin('tableType', TType::STRING, 12); - $xfer += $output->writeString($this->tableType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Partition { - static $_TSPEC; - - public $values = null; - public $dbName = null; - public $tableName = null; - public $createTime = null; - public $lastAccessTime = null; - public $sd = null; - public $parameters = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'values', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 2 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'tableName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'createTime', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'lastAccessTime', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'sd', - 'type' => TType::STRUCT, - 'class' => 'metastore_StorageDescriptor', - ), - 7 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['values'])) { - $this->values = $vals['values']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['tableName'])) { - $this->tableName = $vals['tableName']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - } - } - - public function getName() { - return 'Partition'; - } - - 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::LST) { - $this->values = array(); - $_size62 = 0; - $_etype65 = 0; - $xfer += $input->readListBegin($_etype65, $_size62); - for ($_i66 = 0; $_i66 < $_size62; ++$_i66) - { - $elem67 = null; - $xfer += $input->readString($elem67); - $this->values []= $elem67; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->tableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->createTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->lastAccessTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::STRUCT) { - $this->sd = new metastore_StorageDescriptor(); - $xfer += $this->sd->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size68 = 0; - $_ktype69 = 0; - $_vtype70 = 0; - $xfer += $input->readMapBegin($_ktype69, $_vtype70, $_size68); - for ($_i72 = 0; $_i72 < $_size68; ++$_i72) - { - $key73 = ''; - $val74 = ''; - $xfer += $input->readString($key73); - $xfer += $input->readString($val74); - $this->parameters[$key73] = $val74; - } - $xfer += $input->readMapEnd(); - } 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('Partition'); - if ($this->values !== null) { - if (!is_array($this->values)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('values', TType::LST, 1); - { - $output->writeListBegin(TType::STRING, count($this->values)); - { - foreach ($this->values as $iter75) - { - $xfer += $output->writeString($iter75); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 2); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->tableName !== null) { - $xfer += $output->writeFieldBegin('tableName', TType::STRING, 3); - $xfer += $output->writeString($this->tableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 4); - $xfer += $output->writeI32($this->createTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 5); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->sd !== null) { - if (!is_object($this->sd)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 6); - $xfer += $this->sd->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 7); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter76 => $viter77) - { - $xfer += $output->writeString($kiter76); - $xfer += $output->writeString($viter77); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Index { - static $_TSPEC; - - public $indexName = null; - public $indexHandlerClass = null; - public $dbName = null; - public $origTableName = null; - public $createTime = null; - public $lastAccessTime = null; - public $indexTableName = null; - public $sd = null; - public $parameters = null; - public $deferredRebuild = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'indexName', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'indexHandlerClass', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'dbName', - 'type' => TType::STRING, - ), - 4 => array( - 'var' => 'origTableName', - 'type' => TType::STRING, - ), - 5 => array( - 'var' => 'createTime', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'lastAccessTime', - 'type' => TType::I32, - ), - 7 => array( - 'var' => 'indexTableName', - 'type' => TType::STRING, - ), - 8 => array( - 'var' => 'sd', - 'type' => TType::STRUCT, - 'class' => 'metastore_StorageDescriptor', - ), - 9 => array( - 'var' => 'parameters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 10 => array( - 'var' => 'deferredRebuild', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['indexName'])) { - $this->indexName = $vals['indexName']; - } - if (isset($vals['indexHandlerClass'])) { - $this->indexHandlerClass = $vals['indexHandlerClass']; - } - if (isset($vals['dbName'])) { - $this->dbName = $vals['dbName']; - } - if (isset($vals['origTableName'])) { - $this->origTableName = $vals['origTableName']; - } - if (isset($vals['createTime'])) { - $this->createTime = $vals['createTime']; - } - if (isset($vals['lastAccessTime'])) { - $this->lastAccessTime = $vals['lastAccessTime']; - } - if (isset($vals['indexTableName'])) { - $this->indexTableName = $vals['indexTableName']; - } - if (isset($vals['sd'])) { - $this->sd = $vals['sd']; - } - if (isset($vals['parameters'])) { - $this->parameters = $vals['parameters']; - } - if (isset($vals['deferredRebuild'])) { - $this->deferredRebuild = $vals['deferredRebuild']; - } - } - } - - public function getName() { - return 'Index'; - } - - 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->indexName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexHandlerClass); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->dbName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->origTableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->createTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->lastAccessTime); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->indexTableName); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::STRUCT) { - $this->sd = new metastore_StorageDescriptor(); - $xfer += $this->sd->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 9: - if ($ftype == TType::MAP) { - $this->parameters = array(); - $_size78 = 0; - $_ktype79 = 0; - $_vtype80 = 0; - $xfer += $input->readMapBegin($_ktype79, $_vtype80, $_size78); - for ($_i82 = 0; $_i82 < $_size78; ++$_i82) - { - $key83 = ''; - $val84 = ''; - $xfer += $input->readString($key83); - $xfer += $input->readString($val84); - $this->parameters[$key83] = $val84; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 10: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->deferredRebuild); - } 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('Index'); - if ($this->indexName !== null) { - $xfer += $output->writeFieldBegin('indexName', TType::STRING, 1); - $xfer += $output->writeString($this->indexName); - $xfer += $output->writeFieldEnd(); - } - if ($this->indexHandlerClass !== null) { - $xfer += $output->writeFieldBegin('indexHandlerClass', TType::STRING, 2); - $xfer += $output->writeString($this->indexHandlerClass); - $xfer += $output->writeFieldEnd(); - } - if ($this->dbName !== null) { - $xfer += $output->writeFieldBegin('dbName', TType::STRING, 3); - $xfer += $output->writeString($this->dbName); - $xfer += $output->writeFieldEnd(); - } - if ($this->origTableName !== null) { - $xfer += $output->writeFieldBegin('origTableName', TType::STRING, 4); - $xfer += $output->writeString($this->origTableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->createTime !== null) { - $xfer += $output->writeFieldBegin('createTime', TType::I32, 5); - $xfer += $output->writeI32($this->createTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->lastAccessTime !== null) { - $xfer += $output->writeFieldBegin('lastAccessTime', TType::I32, 6); - $xfer += $output->writeI32($this->lastAccessTime); - $xfer += $output->writeFieldEnd(); - } - if ($this->indexTableName !== null) { - $xfer += $output->writeFieldBegin('indexTableName', TType::STRING, 7); - $xfer += $output->writeString($this->indexTableName); - $xfer += $output->writeFieldEnd(); - } - if ($this->sd !== null) { - if (!is_object($this->sd)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('sd', TType::STRUCT, 8); - $xfer += $this->sd->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->parameters !== null) { - if (!is_array($this->parameters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('parameters', TType::MAP, 9); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->parameters)); - { - foreach ($this->parameters as $kiter85 => $viter86) - { - $xfer += $output->writeString($kiter85); - $xfer += $output->writeString($viter86); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->deferredRebuild !== null) { - $xfer += $output->writeFieldBegin('deferredRebuild', TType::BOOL, 10); - $xfer += $output->writeBool($this->deferredRebuild); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_Schema { - static $_TSPEC; - - public $fieldSchemas = null; - public $properties = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'fieldSchemas', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'metastore_FieldSchema', - ), - ), - 2 => array( - 'var' => 'properties', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['fieldSchemas'])) { - $this->fieldSchemas = $vals['fieldSchemas']; - } - if (isset($vals['properties'])) { - $this->properties = $vals['properties']; - } - } - } - - public function getName() { - return 'Schema'; - } - - 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::LST) { - $this->fieldSchemas = array(); - $_size87 = 0; - $_etype90 = 0; - $xfer += $input->readListBegin($_etype90, $_size87); - for ($_i91 = 0; $_i91 < $_size87; ++$_i91) - { - $elem92 = null; - $elem92 = new metastore_FieldSchema(); - $xfer += $elem92->read($input); - $this->fieldSchemas []= $elem92; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::MAP) { - $this->properties = array(); - $_size93 = 0; - $_ktype94 = 0; - $_vtype95 = 0; - $xfer += $input->readMapBegin($_ktype94, $_vtype95, $_size93); - for ($_i97 = 0; $_i97 < $_size93; ++$_i97) - { - $key98 = ''; - $val99 = ''; - $xfer += $input->readString($key98); - $xfer += $input->readString($val99); - $this->properties[$key98] = $val99; - } - $xfer += $input->readMapEnd(); - } 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('Schema'); - if ($this->fieldSchemas !== null) { - if (!is_array($this->fieldSchemas)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('fieldSchemas', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->fieldSchemas)); - { - foreach ($this->fieldSchemas as $iter100) - { - $xfer += $iter100->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->properties !== null) { - if (!is_array($this->properties)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('properties', TType::MAP, 2); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->properties)); - { - foreach ($this->properties as $kiter101 => $viter102) - { - $xfer += $output->writeString($kiter101); - $xfer += $output->writeString($viter102); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class metastore_MetaException 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 'MetaException'; - } - - 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('MetaException'); - 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; - } - -} - -class metastore_UnknownTableException 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 'UnknownTableException'; - } - - 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('UnknownTableException'); - 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; - } - -} - -class metastore_UnknownDBException 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 'UnknownDBException'; - } - - 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('UnknownDBException'); - 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; - } - -} - -class metastore_AlreadyExistsException 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 'AlreadyExistsException'; - } - - 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('AlreadyExistsException'); - 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; - } - -} - -class metastore_InvalidObjectException 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 'InvalidObjectException'; - } - - 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('InvalidObjectException'); - 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; - } - -} - -class metastore_NoSuchObjectException 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 'NoSuchObjectException'; - } - - 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('NoSuchObjectException'); - 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; - } - -} - -class metastore_IndexAlreadyExistsException 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 'IndexAlreadyExistsException'; - } - - 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('IndexAlreadyExistsException'); - 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; - } - -} - -class metastore_InvalidOperationException 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 'InvalidOperationException'; - } - - 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('InvalidOperationException'); - 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; - } - -} - -class metastore_ConfigValSecurityException 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 'ConfigValSecurityException'; - } - - 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('ConfigValSecurityException'); - 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-py/hive_metastore/ThriftHiveMetastore-remote metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote old mode 100644 new mode 100755 index 80a1765..a7b1333 --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore-remote @@ -71,20 +71,22 @@ http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') + parts = sys.argv[argi+1].split(':') host = parts[0] port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') + parts = url[1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) else: port = 80 uri = url[2] + if url[4]: + uri += '?%s' % url[4] http = True argi += 2 @@ -335,4 +337,8 @@ elif cmd == 'get_index_names': sys.exit(1) pp.pprint(client.get_index_names(args[0],args[1],eval(args[2]),)) +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + transport.close() diff --git metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py index 78318f0..e957b4c 100644 --- metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py +++ metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py @@ -9,7 +9,7 @@ import fb303.FacebookService from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -2422,6 +2422,9 @@ class create_database_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2505,6 +2508,9 @@ class create_database_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2561,6 +2567,9 @@ class get_database_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2643,6 +2652,9 @@ class get_database_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2711,6 +2723,9 @@ class drop_database_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2794,6 +2809,9 @@ class drop_database_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2850,6 +2868,9 @@ class get_databases_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2926,6 +2947,9 @@ class get_databases_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -2964,6 +2988,9 @@ class get_all_databases_args: oprot.writeStructBegin('get_all_databases_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3040,6 +3067,9 @@ class get_all_databases_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3096,6 +3126,9 @@ class get_type_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3178,6 +3211,9 @@ class get_type_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3235,6 +3271,9 @@ class create_type_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3329,6 +3368,9 @@ class create_type_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3385,6 +3427,9 @@ class drop_type_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3466,6 +3511,9 @@ class drop_type_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3522,6 +3570,9 @@ class get_type_all_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3601,6 +3652,9 @@ class get_type_all_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3669,6 +3723,9 @@ class get_fields_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3772,6 +3829,9 @@ class get_fields_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3840,6 +3900,9 @@ class get_schema_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -3943,6 +4006,9 @@ class get_schema_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4000,6 +4066,9 @@ class create_table_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4096,6 +4165,9 @@ class create_table_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4176,6 +4248,9 @@ class drop_table_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4246,6 +4321,9 @@ class drop_table_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4314,6 +4392,9 @@ class get_tables_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4390,6 +4471,9 @@ class get_tables_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4446,6 +4530,9 @@ class get_all_tables_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4522,6 +4609,9 @@ class get_all_tables_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4590,6 +4680,9 @@ class get_table_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4672,6 +4765,9 @@ class get_table_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4753,6 +4849,9 @@ class alter_table_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4823,6 +4922,9 @@ class alter_table_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4880,6 +4982,9 @@ class add_partition_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -4975,6 +5080,9 @@ class add_partition_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5063,6 +5171,9 @@ class append_partition_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5158,6 +5269,9 @@ class append_partition_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5238,6 +5352,9 @@ class append_partition_by_name_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5333,6 +5450,9 @@ class append_partition_by_name_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5433,6 +5553,9 @@ class drop_partition_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5514,6 +5637,9 @@ class drop_partition_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5606,6 +5732,9 @@ class drop_partition_by_name_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5687,6 +5816,9 @@ class drop_partition_by_name_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5775,6 +5907,9 @@ class get_partition_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5857,6 +5992,9 @@ class get_partition_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -5937,6 +6075,9 @@ class get_partition_by_name_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6019,6 +6160,9 @@ class get_partition_by_name_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6099,6 +6243,9 @@ class get_partitions_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6189,6 +6336,9 @@ class get_partitions_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6269,6 +6419,9 @@ class get_partition_names_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6345,6 +6498,9 @@ class get_partition_names_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6445,6 +6601,9 @@ class get_partitions_ps_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6522,6 +6681,9 @@ class get_partitions_ps_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6622,6 +6784,9 @@ class get_partition_names_ps_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6698,6 +6863,9 @@ class get_partition_names_ps_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6790,6 +6958,9 @@ class get_partitions_by_filter_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6880,6 +7051,9 @@ class get_partitions_by_filter_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -6961,6 +7135,9 @@ class alter_partition_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7031,6 +7208,9 @@ class alter_partition_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7099,6 +7279,9 @@ class get_config_value_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7167,6 +7350,9 @@ class get_config_value_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7223,6 +7409,9 @@ class partition_name_to_vals_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7299,6 +7488,9 @@ class partition_name_to_vals_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7355,6 +7547,9 @@ class partition_name_to_spec_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7433,6 +7628,9 @@ class partition_name_to_spec_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7503,6 +7701,9 @@ class add_index_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7598,6 +7799,9 @@ class add_index_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7690,6 +7894,9 @@ class drop_index_by_name_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7771,6 +7978,9 @@ class drop_index_by_name_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7851,6 +8061,9 @@ class get_index_by_name_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -7933,6 +8146,9 @@ class get_index_by_name_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -8013,6 +8229,9 @@ class get_indexes_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -8103,6 +8322,9 @@ class get_indexes_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -8183,6 +8405,9 @@ class get_index_names_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -8259,6 +8484,9 @@ class get_index_names_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -8270,5 +8498,3 @@ class get_index_names_result: def __ne__(self, other): return not (self == other) - - diff --git metastore/src/gen-py/hive_metastore/constants.py metastore/src/gen-py/hive_metastore/constants.py index 0f70b3a..fdffe2f 100644 --- metastore/src/gen-py/hive_metastore/constants.py +++ metastore/src/gen-py/hive_metastore/constants.py @@ -8,34 +8,18 @@ from thrift.Thrift import * from ttypes import * DDL_TIME = "transient_lastDdlTime" - IS_ARCHIVED = "is_archived" - ORIGINAL_LOCATION = "original_location" - META_TABLE_COLUMNS = "columns" - META_TABLE_COLUMN_TYPES = "columns.types" - BUCKET_FIELD_NAME = "bucket_field_name" - BUCKET_COUNT = "bucket_count" - FIELD_TO_DIMENSION = "field_to_dimension" - META_TABLE_NAME = "name" - META_TABLE_DB = "db" - META_TABLE_LOCATION = "location" - META_TABLE_SERDE = "serde" - META_TABLE_PARTITION_COLUMNS = "partition_columns" - FILE_INPUT_FORMAT = "file.inputformat" - FILE_OUTPUT_FORMAT = "file.outputformat" - META_TABLE_STORAGE = "storage_handler" - diff --git metastore/src/gen-py/hive_metastore/ttypes.py metastore/src/gen-py/hive_metastore/ttypes.py index 9e2479b..baf51b4 100644 --- metastore/src/gen-py/hive_metastore/ttypes.py +++ metastore/src/gen-py/hive_metastore/ttypes.py @@ -9,13 +9,14 @@ import fb303.ttypes from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: fastbinary = None + class Version: """ Attributes: @@ -72,6 +73,9 @@ class Version: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -152,6 +156,9 @@ class FieldSchema: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -253,6 +260,9 @@ class Type: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -333,6 +343,9 @@ class Database: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -423,6 +436,9 @@ class SerDeInfo: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -491,6 +507,9 @@ class Order: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -692,6 +711,9 @@ class StorageDescriptor: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -900,6 +922,9 @@ class Table: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1047,6 +1072,9 @@ class Partition: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1222,6 +1250,9 @@ class Index: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1309,6 +1340,9 @@ class Schema: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1365,6 +1399,9 @@ class MetaException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1424,6 +1461,9 @@ class UnknownTableException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1483,6 +1523,9 @@ class UnknownDBException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1542,6 +1585,9 @@ class AlreadyExistsException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1601,6 +1647,9 @@ class InvalidObjectException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1660,6 +1709,9 @@ class NoSuchObjectException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1719,6 +1771,9 @@ class IndexAlreadyExistsException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1778,6 +1833,9 @@ class InvalidOperationException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1837,6 +1895,9 @@ class ConfigValSecurityException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -1851,4 +1912,3 @@ class ConfigValSecurityException(Exception): def __ne__(self, other): return not (self == other) - diff --git metastore/src/gen-rb/hive_metastore_constants.rb metastore/src/gen-rb/hive_metastore_constants.rb new file mode 100644 index 0000000..42c717b --- /dev/null +++ metastore/src/gen-rb/hive_metastore_constants.rb @@ -0,0 +1,40 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'hive_metastore_types' + +DDL_TIME = %q"transient_lastDdlTime" + +IS_ARCHIVED = %q"is_archived" + +ORIGINAL_LOCATION = %q"original_location" + +META_TABLE_COLUMNS = %q"columns" + +META_TABLE_COLUMN_TYPES = %q"columns.types" + +BUCKET_FIELD_NAME = %q"bucket_field_name" + +BUCKET_COUNT = %q"bucket_count" + +FIELD_TO_DIMENSION = %q"field_to_dimension" + +META_TABLE_NAME = %q"name" + +META_TABLE_DB = %q"db" + +META_TABLE_LOCATION = %q"location" + +META_TABLE_SERDE = %q"serde" + +META_TABLE_PARTITION_COLUMNS = %q"partition_columns" + +FILE_INPUT_FORMAT = %q"file.inputformat" + +FILE_OUTPUT_FORMAT = %q"file.outputformat" + +META_TABLE_STORAGE = %q"storage_handler" + diff --git metastore/src/gen-rb/hive_metastore_types.rb metastore/src/gen-rb/hive_metastore_types.rb new file mode 100644 index 0000000..80349cb --- /dev/null +++ metastore/src/gen-rb/hive_metastore_types.rb @@ -0,0 +1,468 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'fb303_types' + + +class Version + include ::Thrift::Struct, ::Thrift::Struct_Union + VERSION = 1 + COMMENTS = 2 + + FIELDS = { + VERSION => {:type => ::Thrift::Types::STRING, :name => 'version'}, + COMMENTS => {:type => ::Thrift::Types::STRING, :name => 'comments'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class FieldSchema + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE = 2 + COMMENT = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'}, + COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Type + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + TYPE1 = 2 + TYPE2 = 3 + FIELDS = 4 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + TYPE1 => {:type => ::Thrift::Types::STRING, :name => 'type1', :optional => true}, + TYPE2 => {:type => ::Thrift::Types::STRING, :name => 'type2', :optional => true}, + FIELDS => {:type => ::Thrift::Types::LIST, :name => 'fields', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Database + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DESCRIPTION = 2 + LOCATIONURI = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}, + LOCATIONURI => {:type => ::Thrift::Types::STRING, :name => 'locationUri'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class SerDeInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + SERIALIZATIONLIB = 2 + PARAMETERS = 3 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + SERIALIZATIONLIB => {:type => ::Thrift::Types::STRING, :name => 'serializationLib'}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Order + include ::Thrift::Struct, ::Thrift::Struct_Union + COL = 1 + ORDER = 2 + + FIELDS = { + COL => {:type => ::Thrift::Types::STRING, :name => 'col'}, + ORDER => {:type => ::Thrift::Types::I32, :name => 'order'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class StorageDescriptor + include ::Thrift::Struct, ::Thrift::Struct_Union + COLS = 1 + LOCATION = 2 + INPUTFORMAT = 3 + OUTPUTFORMAT = 4 + COMPRESSED = 5 + NUMBUCKETS = 6 + SERDEINFO = 7 + BUCKETCOLS = 8 + SORTCOLS = 9 + PARAMETERS = 10 + + FIELDS = { + COLS => {:type => ::Thrift::Types::LIST, :name => 'cols', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + LOCATION => {:type => ::Thrift::Types::STRING, :name => 'location'}, + INPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'inputFormat'}, + OUTPUTFORMAT => {:type => ::Thrift::Types::STRING, :name => 'outputFormat'}, + COMPRESSED => {:type => ::Thrift::Types::BOOL, :name => 'compressed'}, + NUMBUCKETS => {:type => ::Thrift::Types::I32, :name => 'numBuckets'}, + SERDEINFO => {:type => ::Thrift::Types::STRUCT, :name => 'serdeInfo', :class => SerDeInfo}, + BUCKETCOLS => {:type => ::Thrift::Types::LIST, :name => 'bucketCols', :element => {:type => ::Thrift::Types::STRING}}, + SORTCOLS => {:type => ::Thrift::Types::LIST, :name => 'sortCols', :element => {:type => ::Thrift::Types::STRUCT, :class => Order}}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Table + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + DBNAME = 2 + OWNER = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + RETENTION = 6 + SD = 7 + PARTITIONKEYS = 8 + PARAMETERS = 9 + VIEWORIGINALTEXT = 10 + VIEWEXPANDEDTEXT = 11 + TABLETYPE = 12 + + FIELDS = { + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + OWNER => {:type => ::Thrift::Types::STRING, :name => 'owner'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + RETENTION => {:type => ::Thrift::Types::I32, :name => 'retention'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARTITIONKEYS => {:type => ::Thrift::Types::LIST, :name => 'partitionKeys', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + VIEWORIGINALTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewOriginalText'}, + VIEWEXPANDEDTEXT => {:type => ::Thrift::Types::STRING, :name => 'viewExpandedText'}, + TABLETYPE => {:type => ::Thrift::Types::STRING, :name => 'tableType'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Partition + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUES = 1 + DBNAME = 2 + TABLENAME = 3 + CREATETIME = 4 + LASTACCESSTIME = 5 + SD = 6 + PARAMETERS = 7 + + FIELDS = { + VALUES => {:type => ::Thrift::Types::LIST, :name => 'values', :element => {:type => ::Thrift::Types::STRING}}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Index + include ::Thrift::Struct, ::Thrift::Struct_Union + INDEXNAME = 1 + INDEXHANDLERCLASS = 2 + DBNAME = 3 + ORIGTABLENAME = 4 + CREATETIME = 5 + LASTACCESSTIME = 6 + INDEXTABLENAME = 7 + SD = 8 + PARAMETERS = 9 + DEFERREDREBUILD = 10 + + FIELDS = { + INDEXNAME => {:type => ::Thrift::Types::STRING, :name => 'indexName'}, + INDEXHANDLERCLASS => {:type => ::Thrift::Types::STRING, :name => 'indexHandlerClass'}, + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbName'}, + ORIGTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'origTableName'}, + CREATETIME => {:type => ::Thrift::Types::I32, :name => 'createTime'}, + LASTACCESSTIME => {:type => ::Thrift::Types::I32, :name => 'lastAccessTime'}, + INDEXTABLENAME => {:type => ::Thrift::Types::STRING, :name => 'indexTableName'}, + SD => {:type => ::Thrift::Types::STRUCT, :name => 'sd', :class => StorageDescriptor}, + PARAMETERS => {:type => ::Thrift::Types::MAP, :name => 'parameters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + DEFERREDREBUILD => {:type => ::Thrift::Types::BOOL, :name => 'deferredRebuild'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class Schema + include ::Thrift::Struct, ::Thrift::Struct_Union + FIELDSCHEMAS = 1 + PROPERTIES = 2 + + FIELDS = { + FIELDSCHEMAS => {:type => ::Thrift::Types::LIST, :name => 'fieldSchemas', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + PROPERTIES => {:type => ::Thrift::Types::MAP, :name => 'properties', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class MetaException < ::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 + +class UnknownTableException < ::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 + +class UnknownDBException < ::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 + +class AlreadyExistsException < ::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 + +class InvalidObjectException < ::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 + +class NoSuchObjectException < ::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 + +class IndexAlreadyExistsException < ::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 + +class InvalidOperationException < ::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 + +class ConfigValSecurityException < ::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-rb/thrift_hive_metastore.rb metastore/src/gen-rb/thrift_hive_metastore.rb new file mode 100644 index 0000000..0d9e955 --- /dev/null +++ metastore/src/gen-rb/thrift_hive_metastore.rb @@ -0,0 +1,2607 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'facebook_service' +require 'hive_metastore_types' + +module ThriftHiveMetastore + class Client < FacebookService::Client + include ::Thrift::Client + + def create_database(database) + send_create_database(database) + recv_create_database() + end + + def send_create_database(database) + send_message('create_database', Create_database_args, :database => database) + end + + def recv_create_database() + result = receive_message(Create_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_database(name) + send_get_database(name) + return recv_get_database() + end + + def send_get_database(name) + send_message('get_database', Get_database_args, :name => name) + end + + def recv_get_database() + result = receive_message(Get_database_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_database failed: unknown result') + end + + def drop_database(name, deleteData) + send_drop_database(name, deleteData) + recv_drop_database() + end + + def send_drop_database(name, deleteData) + send_message('drop_database', Drop_database_args, :name => name, :deleteData => deleteData) + end + + def recv_drop_database() + result = receive_message(Drop_database_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_databases(pattern) + send_get_databases(pattern) + return recv_get_databases() + end + + def send_get_databases(pattern) + send_message('get_databases', Get_databases_args, :pattern => pattern) + end + + def recv_get_databases() + result = receive_message(Get_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_databases failed: unknown result') + end + + def get_all_databases() + send_get_all_databases() + return recv_get_all_databases() + end + + def send_get_all_databases() + send_message('get_all_databases', Get_all_databases_args) + end + + def recv_get_all_databases() + result = receive_message(Get_all_databases_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_databases failed: unknown result') + end + + def get_type(name) + send_get_type(name) + return recv_get_type() + end + + def send_get_type(name) + send_message('get_type', Get_type_args, :name => name) + end + + def recv_get_type() + result = receive_message(Get_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type failed: unknown result') + end + + def create_type(type) + send_create_type(type) + return recv_create_type() + end + + def send_create_type(type) + send_message('create_type', Create_type_args, :type => type) + end + + def recv_create_type() + result = receive_message(Create_type_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'create_type failed: unknown result') + end + + def drop_type(type) + send_drop_type(type) + return recv_drop_type() + end + + def send_drop_type(type) + send_message('drop_type', Drop_type_args, :type => type) + end + + def recv_drop_type() + result = receive_message(Drop_type_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_type failed: unknown result') + end + + def get_type_all(name) + send_get_type_all(name) + return recv_get_type_all() + end + + def send_get_type_all(name) + send_message('get_type_all', Get_type_all_args, :name => name) + end + + def recv_get_type_all() + result = receive_message(Get_type_all_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_type_all failed: unknown result') + end + + def get_fields(db_name, table_name) + send_get_fields(db_name, table_name) + return recv_get_fields() + end + + def send_get_fields(db_name, table_name) + send_message('get_fields', Get_fields_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_fields() + result = receive_message(Get_fields_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_fields failed: unknown result') + end + + def get_schema(db_name, table_name) + send_get_schema(db_name, table_name) + return recv_get_schema() + end + + def send_get_schema(db_name, table_name) + send_message('get_schema', Get_schema_args, :db_name => db_name, :table_name => table_name) + end + + def recv_get_schema() + result = receive_message(Get_schema_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_schema failed: unknown result') + end + + def create_table(tbl) + send_create_table(tbl) + recv_create_table() + end + + def send_create_table(tbl) + send_message('create_table', Create_table_args, :tbl => tbl) + end + + def recv_create_table() + result = receive_message(Create_table_result) + 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? + return + end + + def drop_table(dbname, name, deleteData) + send_drop_table(dbname, name, deleteData) + recv_drop_table() + end + + def send_drop_table(dbname, name, deleteData) + send_message('drop_table', Drop_table_args, :dbname => dbname, :name => name, :deleteData => deleteData) + end + + def recv_drop_table() + result = receive_message(Drop_table_result) + raise result.o1 unless result.o1.nil? + raise result.o3 unless result.o3.nil? + return + end + + def get_tables(db_name, pattern) + send_get_tables(db_name, pattern) + return recv_get_tables() + end + + def send_get_tables(db_name, pattern) + send_message('get_tables', Get_tables_args, :db_name => db_name, :pattern => pattern) + end + + def recv_get_tables() + result = receive_message(Get_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_tables failed: unknown result') + end + + def get_all_tables(db_name) + send_get_all_tables(db_name) + return recv_get_all_tables() + end + + def send_get_all_tables(db_name) + send_message('get_all_tables', Get_all_tables_args, :db_name => db_name) + end + + def recv_get_all_tables() + result = receive_message(Get_all_tables_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_all_tables failed: unknown result') + end + + def get_table(dbname, tbl_name) + send_get_table(dbname, tbl_name) + return recv_get_table() + end + + def send_get_table(dbname, tbl_name) + send_message('get_table', Get_table_args, :dbname => dbname, :tbl_name => tbl_name) + end + + def recv_get_table() + result = receive_message(Get_table_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_table failed: unknown result') + end + + def alter_table(dbname, tbl_name, new_tbl) + send_alter_table(dbname, tbl_name, new_tbl) + recv_alter_table() + end + + def send_alter_table(dbname, tbl_name, new_tbl) + send_message('alter_table', Alter_table_args, :dbname => dbname, :tbl_name => tbl_name, :new_tbl => new_tbl) + end + + def recv_alter_table() + result = receive_message(Alter_table_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def add_partition(new_part) + send_add_partition(new_part) + return recv_add_partition() + end + + def send_add_partition(new_part) + send_message('add_partition', Add_partition_args, :new_part => new_part) + end + + def recv_add_partition() + result = receive_message(Add_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_partition failed: unknown result') + end + + def append_partition(db_name, tbl_name, part_vals) + send_append_partition(db_name, tbl_name, part_vals) + return recv_append_partition() + end + + def send_append_partition(db_name, tbl_name, part_vals) + send_message('append_partition', Append_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_append_partition() + result = receive_message(Append_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition failed: unknown result') + end + + def append_partition_by_name(db_name, tbl_name, part_name) + send_append_partition_by_name(db_name, tbl_name, part_name) + return recv_append_partition_by_name() + end + + def send_append_partition_by_name(db_name, tbl_name, part_name) + send_message('append_partition_by_name', Append_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_append_partition_by_name() + result = receive_message(Append_partition_by_name_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'append_partition_by_name failed: unknown result') + end + + def drop_partition(db_name, tbl_name, part_vals, deleteData) + send_drop_partition(db_name, tbl_name, part_vals, deleteData) + return recv_drop_partition() + end + + def send_drop_partition(db_name, tbl_name, part_vals, deleteData) + send_message('drop_partition', Drop_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :deleteData => deleteData) + end + + def recv_drop_partition() + result = receive_message(Drop_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition failed: unknown result') + end + + def drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + return recv_drop_partition_by_name() + end + + def send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData) + send_message('drop_partition_by_name', Drop_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name, :deleteData => deleteData) + end + + def recv_drop_partition_by_name() + result = receive_message(Drop_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_partition_by_name failed: unknown result') + end + + def get_partition(db_name, tbl_name, part_vals) + send_get_partition(db_name, tbl_name, part_vals) + return recv_get_partition() + end + + def send_get_partition(db_name, tbl_name, part_vals) + send_message('get_partition', Get_partition_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals) + end + + def recv_get_partition() + result = receive_message(Get_partition_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition failed: unknown result') + end + + def get_partition_by_name(db_name, tbl_name, part_name) + send_get_partition_by_name(db_name, tbl_name, part_name) + return recv_get_partition_by_name() + end + + def send_get_partition_by_name(db_name, tbl_name, part_name) + send_message('get_partition_by_name', Get_partition_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :part_name => part_name) + end + + def recv_get_partition_by_name() + result = receive_message(Get_partition_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_by_name failed: unknown result') + end + + def get_partitions(db_name, tbl_name, max_parts) + send_get_partitions(db_name, tbl_name, max_parts) + return recv_get_partitions() + end + + def send_get_partitions(db_name, tbl_name, max_parts) + send_message('get_partitions', Get_partitions_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partitions() + result = receive_message(Get_partitions_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions failed: unknown result') + end + + def get_partition_names(db_name, tbl_name, max_parts) + send_get_partition_names(db_name, tbl_name, max_parts) + return recv_get_partition_names() + end + + def send_get_partition_names(db_name, tbl_name, max_parts) + send_message('get_partition_names', Get_partition_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_parts => max_parts) + end + + def recv_get_partition_names() + result = receive_message(Get_partition_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names failed: unknown result') + end + + def get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partitions_ps() + end + + def send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partitions_ps', Get_partitions_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partitions_ps() + result = receive_message(Get_partitions_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_ps failed: unknown result') + end + + def get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + return recv_get_partition_names_ps() + end + + def send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts) + send_message('get_partition_names_ps', Get_partition_names_ps_args, :db_name => db_name, :tbl_name => tbl_name, :part_vals => part_vals, :max_parts => max_parts) + end + + def recv_get_partition_names_ps() + result = receive_message(Get_partition_names_ps_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partition_names_ps failed: unknown result') + end + + def get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + return recv_get_partitions_by_filter() + end + + def send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts) + send_message('get_partitions_by_filter', Get_partitions_by_filter_args, :db_name => db_name, :tbl_name => tbl_name, :filter => filter, :max_parts => max_parts) + end + + def recv_get_partitions_by_filter() + result = receive_message(Get_partitions_by_filter_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_partitions_by_filter failed: unknown result') + end + + def alter_partition(db_name, tbl_name, new_part) + send_alter_partition(db_name, tbl_name, new_part) + recv_alter_partition() + end + + def send_alter_partition(db_name, tbl_name, new_part) + send_message('alter_partition', Alter_partition_args, :db_name => db_name, :tbl_name => tbl_name, :new_part => new_part) + end + + def recv_alter_partition() + result = receive_message(Alter_partition_result) + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + return + end + + def get_config_value(name, defaultValue) + send_get_config_value(name, defaultValue) + return recv_get_config_value() + end + + def send_get_config_value(name, defaultValue) + send_message('get_config_value', Get_config_value_args, :name => name, :defaultValue => defaultValue) + end + + def recv_get_config_value() + result = receive_message(Get_config_value_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_config_value failed: unknown result') + end + + def partition_name_to_vals(part_name) + send_partition_name_to_vals(part_name) + return recv_partition_name_to_vals() + end + + def send_partition_name_to_vals(part_name) + send_message('partition_name_to_vals', Partition_name_to_vals_args, :part_name => part_name) + end + + def recv_partition_name_to_vals() + result = receive_message(Partition_name_to_vals_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_vals failed: unknown result') + end + + def partition_name_to_spec(part_name) + send_partition_name_to_spec(part_name) + return recv_partition_name_to_spec() + end + + def send_partition_name_to_spec(part_name) + send_message('partition_name_to_spec', Partition_name_to_spec_args, :part_name => part_name) + end + + def recv_partition_name_to_spec() + result = receive_message(Partition_name_to_spec_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'partition_name_to_spec failed: unknown result') + end + + def add_index(new_index, index_table) + send_add_index(new_index, index_table) + return recv_add_index() + end + + def send_add_index(new_index, index_table) + send_message('add_index', Add_index_args, :new_index => new_index, :index_table => index_table) + end + + def recv_add_index() + result = receive_message(Add_index_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 ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'add_index failed: unknown result') + end + + def drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + return recv_drop_index_by_name() + end + + def send_drop_index_by_name(db_name, tbl_name, index_name, deleteData) + send_message('drop_index_by_name', Drop_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name, :deleteData => deleteData) + end + + def recv_drop_index_by_name() + result = receive_message(Drop_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'drop_index_by_name failed: unknown result') + end + + def get_index_by_name(db_name, tbl_name, index_name) + send_get_index_by_name(db_name, tbl_name, index_name) + return recv_get_index_by_name() + end + + def send_get_index_by_name(db_name, tbl_name, index_name) + send_message('get_index_by_name', Get_index_by_name_args, :db_name => db_name, :tbl_name => tbl_name, :index_name => index_name) + end + + def recv_get_index_by_name() + result = receive_message(Get_index_by_name_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_by_name failed: unknown result') + end + + def get_indexes(db_name, tbl_name, max_indexes) + send_get_indexes(db_name, tbl_name, max_indexes) + return recv_get_indexes() + end + + def send_get_indexes(db_name, tbl_name, max_indexes) + send_message('get_indexes', Get_indexes_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_indexes() + result = receive_message(Get_indexes_result) + return result.success unless result.success.nil? + raise result.o1 unless result.o1.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_indexes failed: unknown result') + end + + def get_index_names(db_name, tbl_name, max_indexes) + send_get_index_names(db_name, tbl_name, max_indexes) + return recv_get_index_names() + end + + def send_get_index_names(db_name, tbl_name, max_indexes) + send_message('get_index_names', Get_index_names_args, :db_name => db_name, :tbl_name => tbl_name, :max_indexes => max_indexes) + end + + def recv_get_index_names() + result = receive_message(Get_index_names_result) + return result.success unless result.success.nil? + raise result.o2 unless result.o2.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_index_names failed: unknown result') + end + + end + + class Processor < FacebookService::Processor + include ::Thrift::Processor + + def process_create_database(seqid, iprot, oprot) + args = read_args(iprot, Create_database_args) + result = Create_database_result.new() + begin + @handler.create_database(args.database) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_database', seqid) + end + + def process_get_database(seqid, iprot, oprot) + args = read_args(iprot, Get_database_args) + result = Get_database_result.new() + begin + result.success = @handler.get_database(args.name) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_database', seqid) + end + + def process_drop_database(seqid, iprot, oprot) + args = read_args(iprot, Drop_database_args) + result = Drop_database_result.new() + begin + @handler.drop_database(args.name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue InvalidOperationException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_database', seqid) + end + + def process_get_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_databases_args) + result = Get_databases_result.new() + begin + result.success = @handler.get_databases(args.pattern) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_databases', seqid) + end + + def process_get_all_databases(seqid, iprot, oprot) + args = read_args(iprot, Get_all_databases_args) + result = Get_all_databases_result.new() + begin + result.success = @handler.get_all_databases() + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_databases', seqid) + end + + def process_get_type(seqid, iprot, oprot) + args = read_args(iprot, Get_type_args) + result = Get_type_result.new() + begin + result.success = @handler.get_type(args.name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type', seqid) + end + + def process_create_type(seqid, iprot, oprot) + args = read_args(iprot, Create_type_args) + result = Create_type_result.new() + begin + result.success = @handler.create_type(args.type) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'create_type', seqid) + end + + def process_drop_type(seqid, iprot, oprot) + args = read_args(iprot, Drop_type_args) + result = Drop_type_result.new() + begin + result.success = @handler.drop_type(args.type) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_type', seqid) + end + + def process_get_type_all(seqid, iprot, oprot) + args = read_args(iprot, Get_type_all_args) + result = Get_type_all_result.new() + begin + result.success = @handler.get_type_all(args.name) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_type_all', seqid) + end + + def process_get_fields(seqid, iprot, oprot) + args = read_args(iprot, Get_fields_args) + result = Get_fields_result.new() + begin + result.success = @handler.get_fields(args.db_name, args.table_name) + rescue MetaException => o1 + result.o1 = o1 + rescue UnknownTableException => o2 + result.o2 = o2 + rescue UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_fields', seqid) + end + + def process_get_schema(seqid, iprot, oprot) + args = read_args(iprot, Get_schema_args) + result = Get_schema_result.new() + begin + result.success = @handler.get_schema(args.db_name, args.table_name) + rescue MetaException => o1 + result.o1 = o1 + rescue UnknownTableException => o2 + result.o2 = o2 + rescue UnknownDBException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'get_schema', seqid) + end + + def process_create_table(seqid, iprot, oprot) + args = read_args(iprot, Create_table_args) + result = Create_table_result.new() + begin + @handler.create_table(args.tbl) + rescue AlreadyExistsException => o1 + result.o1 = o1 + rescue InvalidObjectException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + rescue NoSuchObjectException => o4 + result.o4 = o4 + end + write_result(result, oprot, 'create_table', seqid) + end + + def process_drop_table(seqid, iprot, oprot) + args = read_args(iprot, Drop_table_args) + result = Drop_table_result.new() + begin + @handler.drop_table(args.dbname, args.name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'drop_table', seqid) + end + + def process_get_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_tables_args) + result = Get_tables_result.new() + begin + result.success = @handler.get_tables(args.db_name, args.pattern) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_tables', seqid) + end + + def process_get_all_tables(seqid, iprot, oprot) + args = read_args(iprot, Get_all_tables_args) + result = Get_all_tables_result.new() + begin + result.success = @handler.get_all_tables(args.db_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_all_tables', seqid) + end + + def process_get_table(seqid, iprot, oprot) + args = read_args(iprot, Get_table_args) + result = Get_table_result.new() + begin + result.success = @handler.get_table(args.dbname, args.tbl_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_table', seqid) + end + + def process_alter_table(seqid, iprot, oprot) + args = read_args(iprot, Alter_table_args) + result = Alter_table_result.new() + begin + @handler.alter_table(args.dbname, args.tbl_name, args.new_tbl) + rescue InvalidOperationException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_table', seqid) + end + + def process_add_partition(seqid, iprot, oprot) + args = read_args(iprot, Add_partition_args) + result = Add_partition_result.new() + begin + result.success = @handler.add_partition(args.new_part) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_partition', seqid) + end + + def process_append_partition(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_args) + result = Append_partition_result.new() + begin + result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition', seqid) + end + + def process_append_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Append_partition_by_name_args) + result = Append_partition_by_name_result.new() + begin + result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'append_partition_by_name', seqid) + end + + def process_drop_partition(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_args) + result = Drop_partition_result.new() + begin + result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition', seqid) + end + + def process_drop_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_partition_by_name_args) + result = Drop_partition_by_name_result.new() + begin + result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_partition_by_name', seqid) + end + + def process_get_partition(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_args) + result = Get_partition_result.new() + begin + result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition', seqid) + end + + def process_get_partition_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_by_name_args) + result = Get_partition_by_name_result.new() + begin + result.success = @handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_by_name', seqid) + end + + def process_get_partitions(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_args) + result = Get_partitions_result.new() + begin + result.success = @handler.get_partitions(args.db_name, args.tbl_name, args.max_parts) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions', seqid) + end + + def process_get_partition_names(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_args) + result = Get_partition_names_result.new() + begin + result.success = @handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partition_names', seqid) + end + + def process_get_partitions_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_ps_args) + result = Get_partitions_ps_result.new() + begin + result.success = @handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_partitions_ps', seqid) + end + + def process_get_partition_names_ps(seqid, iprot, oprot) + args = read_args(iprot, Get_partition_names_ps_args) + result = Get_partition_names_ps_result.new() + begin + result.success = @handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_partition_names_ps', seqid) + end + + def process_get_partitions_by_filter(seqid, iprot, oprot) + args = read_args(iprot, Get_partitions_by_filter_args) + result = Get_partitions_by_filter_result.new() + begin + result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_partitions_by_filter', seqid) + end + + def process_alter_partition(seqid, iprot, oprot) + args = read_args(iprot, Alter_partition_args) + result = Alter_partition_result.new() + begin + @handler.alter_partition(args.db_name, args.tbl_name, args.new_part) + rescue InvalidOperationException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'alter_partition', seqid) + end + + def process_get_config_value(seqid, iprot, oprot) + args = read_args(iprot, Get_config_value_args) + result = Get_config_value_result.new() + begin + result.success = @handler.get_config_value(args.name, args.defaultValue) + rescue ConfigValSecurityException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'get_config_value', seqid) + end + + def process_partition_name_to_vals(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_vals_args) + result = Partition_name_to_vals_result.new() + begin + result.success = @handler.partition_name_to_vals(args.part_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_vals', seqid) + end + + def process_partition_name_to_spec(seqid, iprot, oprot) + args = read_args(iprot, Partition_name_to_spec_args) + result = Partition_name_to_spec_result.new() + begin + result.success = @handler.partition_name_to_spec(args.part_name) + rescue MetaException => o1 + result.o1 = o1 + end + write_result(result, oprot, 'partition_name_to_spec', seqid) + end + + def process_add_index(seqid, iprot, oprot) + args = read_args(iprot, Add_index_args) + result = Add_index_result.new() + begin + result.success = @handler.add_index(args.new_index, args.index_table) + rescue InvalidObjectException => o1 + result.o1 = o1 + rescue AlreadyExistsException => o2 + result.o2 = o2 + rescue MetaException => o3 + result.o3 = o3 + end + write_result(result, oprot, 'add_index', seqid) + end + + def process_drop_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Drop_index_by_name_args) + result = Drop_index_by_name_result.new() + begin + result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'drop_index_by_name', seqid) + end + + def process_get_index_by_name(seqid, iprot, oprot) + args = read_args(iprot, Get_index_by_name_args) + result = Get_index_by_name_result.new() + begin + result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name) + rescue MetaException => o1 + result.o1 = o1 + rescue NoSuchObjectException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_by_name', seqid) + end + + def process_get_indexes(seqid, iprot, oprot) + args = read_args(iprot, Get_indexes_args) + result = Get_indexes_result.new() + begin + result.success = @handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes) + rescue NoSuchObjectException => o1 + result.o1 = o1 + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_indexes', seqid) + end + + def process_get_index_names(seqid, iprot, oprot) + args = read_args(iprot, Get_index_names_args) + result = Get_index_names_result.new() + begin + result.success = @handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes) + rescue MetaException => o2 + result.o2 = o2 + end + write_result(result, oprot, 'get_index_names', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class Create_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DATABASE = 1 + + FIELDS = { + DATABASE => {:type => ::Thrift::Types::STRUCT, :name => 'database', :class => Database} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Database}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DELETEDATA = 2 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_database_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidOperationException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PATTERN = 1 + + FIELDS = { + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_databases_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Type}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRUCT, :name => 'type', :class => Type} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => InvalidObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TYPE = 1 + + FIELDS = { + TYPE => {:type => ::Thrift::Types::STRING, :name => 'type'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_type_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_type_all_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Type}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_fields_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TABLE_NAME = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TABLE_NAME => {:type => ::Thrift::Types::STRING, :name => 'table_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_schema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => FieldSchema}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => UnknownTableException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => UnknownDBException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TBL = 1 + + FIELDS = { + TBL => {:type => ::Thrift::Types::STRUCT, :name => 'tbl', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Create_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + O3 = 3 + O4 = 4 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => AlreadyExistsException}, + 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 => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + NAME = 2 + DELETEDATA = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O3 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + PATTERN = 2 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + PATTERN => {:type => ::Thrift::Types::STRING, :name => 'pattern'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_all_tables_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Table}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DBNAME = 1 + TBL_NAME = 2 + NEW_TBL = 3 + + FIELDS = { + DBNAME => {:type => ::Thrift::Types::STRING, :name => 'dbname'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NEW_TBL => {:type => ::Thrift::Types::STRUCT, :name => 'new_tbl', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_table_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_PART = 1 + + FIELDS = { + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + 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'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Append_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + DELETEDATA = 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'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_NAME = 3 + + 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'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Partition}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_PARTS = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + PART_VALS = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + PART_VALS => {:type => ::Thrift::Types::LIST, :name => 'part_vals', :element => {:type => ::Thrift::Types::STRING}}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partition_names_ps_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + FILTER = 3 + MAX_PARTS = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + FILTER => {:type => ::Thrift::Types::STRING, :name => 'filter'}, + MAX_PARTS => {:type => ::Thrift::Types::I16, :name => 'max_parts', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_partitions_by_filter_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Partition}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + NEW_PART = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + NEW_PART => {:type => ::Thrift::Types::STRUCT, :name => 'new_part', :class => Partition} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Alter_partition_result + include ::Thrift::Struct, ::Thrift::Struct_Union + O1 = 1 + O2 = 2 + + FIELDS = { + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidOperationException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + DEFAULTVALUE = 2 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name'}, + DEFAULTVALUE => {:type => ::Thrift::Types::STRING, :name => 'defaultValue'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_config_value_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => ConfigValSecurityException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_vals_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_args + include ::Thrift::Struct, ::Thrift::Struct_Union + PART_NAME = 1 + + FIELDS = { + PART_NAME => {:type => ::Thrift::Types::STRING, :name => 'part_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Partition_name_to_spec_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NEW_INDEX = 1 + INDEX_TABLE = 2 + + FIELDS = { + NEW_INDEX => {:type => ::Thrift::Types::STRUCT, :name => 'new_index', :class => Index}, + INDEX_TABLE => {:type => ::Thrift::Types::STRUCT, :name => 'index_table', :class => Table} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Add_index_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + O3 = 3 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => InvalidObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => AlreadyExistsException}, + O3 => {:type => ::Thrift::Types::STRUCT, :name => 'o3', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + DELETEDATA = 4 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'}, + DELETEDATA => {:type => ::Thrift::Types::BOOL, :name => 'deleteData'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Drop_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + INDEX_NAME = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_by_name_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Index}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => MetaException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => NoSuchObjectException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_indexes_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O1 = 1 + O2 = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Index}}, + O1 => {:type => ::Thrift::Types::STRUCT, :name => 'o1', :class => NoSuchObjectException}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_args + include ::Thrift::Struct, ::Thrift::Struct_Union + DB_NAME = 1 + TBL_NAME = 2 + MAX_INDEXES = 3 + + FIELDS = { + DB_NAME => {:type => ::Thrift::Types::STRING, :name => 'db_name'}, + TBL_NAME => {:type => ::Thrift::Types::STRING, :name => 'tbl_name'}, + MAX_INDEXES => {:type => ::Thrift::Types::I16, :name => 'max_indexes', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_index_names_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + O2 = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + O2 => {:type => ::Thrift::Types::STRUCT, :name => 'o2', :class => MetaException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end + diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index a4f1853..ef80c10 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java @@ -416,7 +416,7 @@ public class HiveMetaStore extends ThriftHiveMetastore { } @Override - public int getStatus() { + public fb_status getStatus() { return fb_status.ALIVE; } diff --git metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java index 4f5623c..3f9aa7a 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -448,7 +448,12 @@ public class ObjectStore implements RawStore, Configurable { .getComment())); } } - return new Type(mtype.getName(), mtype.getType1(), mtype.getType2(), fields); + Type ret = new Type(); + ret.setName(mtype.getName()); + ret.setType1(mtype.getType1()); + ret.setType2(mtype.getType2()); + ret.setFields(fields); + return ret; } public boolean createType(Type type) { diff --git odbc/Makefile odbc/Makefile index 816ffd4..2750708 100644 --- odbc/Makefile +++ odbc/Makefile @@ -56,12 +56,13 @@ LINK = ln -sf BUILD_DIR = $(HIVE_ROOT)/build ODBC_BUILD_DIR = $(BUILD_DIR)/odbc OBJ_SERVICE_BUILD_DIR = $(BUILD_DIR)/service/objs -OBJ_FB303_BUILD_DIR = $(BUILD_DIR)/service/fb303/objs +OBJ_QL_BUILD_DIR = $(BUILD_DIR)/ql/objs OBJ_METASTORE_BUILD_DIR = $(BUILD_DIR)/metastore/objs OBJ_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/objs LIB_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/lib TEST_ODBC_BUILD_DIR = $(ODBC_BUILD_DIR)/test -THRIFT_INCLUDE_PATH = $(HIVE_ROOT)/service/include/thrift +THRIFT_INCLUDE_PATH=$(THRIFT_HOME)/include/thrift +FB303_INCLUDE_PATH=$(THRIFT_INCLUDE_PATH)/fb303 INSTALL_PATH = /usr/local INSTALL_LIB_PATH = $(INSTALL_PATH)/lib INSTALL_INCLUDE_PATH = $(INSTALL_PATH)/include @@ -85,11 +86,10 @@ SERVICE_SOURCES = ThriftHive.cpp \ hive_service_types.cpp SERVICE_OBJS = $(addprefix $(OBJ_SERVICE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(SERVICE_SOURCES)))) -FB303_SRC_DIR = $(THRIFT_INCLUDE_PATH)/fb303 -FB303_SOURCES = FacebookService.cpp \ - fb303_constants.cpp \ - fb303_types.cpp -FB303_OBJS = $(addprefix $(OBJ_FB303_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(FB303_SOURCES)))) +QL_SRC_DIR = $(HIVE_ROOT)/ql/src/gen-cpp +QL_SOURCES = queryplan_types.cpp queryplan_constants.cpp +QL_OBJS = $(addprefix $(OBJ_QL_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(QL_SOURCES)))) + METASTORE_SRC_DIR = $(HIVE_ROOT)/metastore/src/gen-cpp METASTORE_SOURCES = ThriftHiveMetastore.cpp \ @@ -98,11 +98,13 @@ METASTORE_SOURCES = ThriftHiveMetastore.cpp \ METASTORE_OBJS = $(addprefix $(OBJ_METASTORE_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(METASTORE_SOURCES)))) ODBC_SRC_DIR = $(BASE_DIR)/src/cpp + ODBC_SOURCES = hiveclient.cpp \ HiveResultSet.cpp \ HiveColumnDesc.cpp \ HiveRowSet.cpp \ hiveclienthelper.cpp + ODBC_OBJS = $(addprefix $(OBJ_ODBC_BUILD_DIR)/,$(patsubst %,%.o,$(basename $(ODBC_SOURCES)))) ODBC_TEST_SRC_DIR = $(BASE_DIR)/src/test @@ -111,9 +113,10 @@ TEST_FLAGS = -DTEST_DATA_DIR=$(ODBC_TEST_DATA_DIR) HIVE_CLIENT_TEST = $(TEST_ODBC_BUILD_DIR)/HiveClientTestC INCLUDE_PATHS = -I$(THRIFT_INCLUDE_PATH) \ + -I$(FB303_INCLUDE_PATH) \ -I$(BOOST_INCLUDE_PATH) \ - -I$(FB303_SRC_DIR) \ -I$(SERVICE_SRC_DIR) \ + -I$(QL_SRC_DIR) \ -I$(METASTORE_SRC_DIR) \ -I$(ODBC_SRC_DIR) @@ -127,20 +130,25 @@ LIB_THRIFT_DIR = $(THRIFT_HOME)/lib LIB_THRIFT_ADD = -L$(LIB_THRIFT_DIR) -lthrift LIB_THRIFT_AR = $(LIB_THRIFT_DIR)/libthrift.a +LIB_FB303_DIR = $(THRIFT_HOME)/lib +LIB_FB303_ADD = -L$(LIB_FB303_DIR) -lfb303 +LIB_FB303_AR = $(LIB_FB303_DIR)/libfb303.a + all:: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST) -$(AR_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS) +$(AR_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS) if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi mkdir -p $(LIB_ODBC_BUILD_DIR) $(AR) $(ARXFLAGS) $(LIB_THRIFT_AR) #Extract thrift archive + $(AR) $(ARXFLAGS) $(LIB_FB303_AR) #Extract fb303 archive $(AR) $(ARFLAGS) $@ $+ *.o #Include all object files into new archive rm *.o #Remove extracted archive object files -$(SO_TARGET): $(FB303_OBJS) $(METASTORE_OBJS) $(SERVICE_OBJS) $(ODBC_OBJS) +$(SO_TARGET): $(METASTORE_OBJS) $(SERVICE_OBJS) $(QL_OBJS) $(ODBC_OBJS) if test -z '$(THRIFT_HOME)'; then echo 'THRIFT_HOME directory?'; exit 1; else exit 0; fi mkdir -p $(LIB_ODBC_BUILD_DIR) - $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) -o $@ \ + $(LD) $(ARCH_FLAGS) $(LDFLAGS) $+ $(LIB_THRIFT_ADD) $(LIB_FB303_ADD) -o $@ \ && $(LINK) $(SO_NAME) $(SO_LINK_TARGET) @@ -148,8 +156,8 @@ $(OBJ_SERVICE_BUILD_DIR)/%.o: $(SERVICE_SRC_DIR)/%.cpp mkdir -p $(OBJ_SERVICE_BUILD_DIR) $(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@ -$(OBJ_FB303_BUILD_DIR)/%.o: $(FB303_SRC_DIR)/%.cpp - mkdir -p $(OBJ_FB303_BUILD_DIR) +$(OBJ_QL_BUILD_DIR)/%.o: $(QL_SRC_DIR)/%.cpp + mkdir -p $(OBJ_QL_BUILD_DIR) $(CXX) $(CXXFLAGS) $(ARCH_FLAGS) $(INCLUDE_PATHS) -c $< -o $@ $(OBJ_METASTORE_BUILD_DIR)/%.o: $(METASTORE_SRC_DIR)/%.cpp @@ -162,7 +170,7 @@ $(OBJ_ODBC_BUILD_DIR)/%.o: $(ODBC_SRC_DIR)/%.cpp $(HIVE_CLIENT_TEST): $(SO_TARGET) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c mkdir -p $(TEST_ODBC_BUILD_DIR) - $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift -o $@ + $(CC) $(CFLAGS) $(ARCH_FLAGS) $(TEST_FLAGS) $(INCLUDE_PATHS) $(ODBC_TEST_SRC_DIR)/hiveclienttest.c -L$(LIB_ODBC_BUILD_DIR) -L$(LIB_THRIFT_DIR) -l$(LIB_NAME) -lthrift $(LIB_FB303_ADD) -o $@ install: $(AR_TARGET) $(SO_TARGET) @@ -179,7 +187,7 @@ uninstall: rm -f $(HEADER_TARGETS) clean: - rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_FB303_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR) + rm -rf $(ODBC_BUILD_DIR) $(OBJ_SERVICE_BUILD_DIR) $(OBJ_QL_BUILD_DIR) $(OBJ_METASTORE_BUILD_DIR) test: $(AR_TARGET) $(SO_TARGET) $(HIVE_CLIENT_TEST) - LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST) + LD_LIBRARY_PATH=$(LIB_ODBC_BUILD_DIR):$(LIB_THRIFT_DIR):$(LIB_FB303_DIR):$(LD_LIBRARY_PATH) $(HIVE_CLIENT_TEST) diff --git odbc/build.xml odbc/build.xml index 64cf988..db9f4af 100644 --- odbc/build.xml +++ odbc/build.xml @@ -46,18 +46,6 @@ - - - - - - - - - - - - diff --git odbc/src/cpp/HiveRowSet.cpp odbc/src/cpp/HiveRowSet.cpp index b4dc2c0..3de6124 100644 --- odbc/src/cpp/HiveRowSet.cpp +++ odbc/src/cpp/HiveRowSet.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "HiveRowSet.h" #include "hiveclienthelper.h" diff --git odbc/src/cpp/hiveclienthelper.cpp odbc/src/cpp/hiveclienthelper.cpp index e2d48f3..b0f3aae 100644 --- odbc/src/cpp/hiveclienthelper.cpp +++ odbc/src/cpp/hiveclienthelper.cpp @@ -18,6 +18,7 @@ #include #include +#include #include "hiveclienthelper.h" #include "thriftserverconstants.h" diff --git ql/build.xml ql/build.xml index a025a2b..6e29302 100644 --- ql/build.xml +++ ql/build.xml @@ -28,7 +28,6 @@ - @@ -55,10 +54,10 @@ - - Executing thrift (which needs to be in your path) on if/queryplan.thrift - - + + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/queryplan.thrift + + @@ -166,7 +165,7 @@ - + diff --git ql/if/queryplan.thrift ql/if/queryplan.thrift index aca0e8f..0f59249 100644 --- ql/if/queryplan.thrift +++ ql/if/queryplan.thrift @@ -1,5 +1,5 @@ namespace java org.apache.hadoop.hive.ql.plan.api -namespace cpp Hive +namespace cpp Apache.Hadoop.Hive enum AdjacencyType { CONJUNCTIVE, DISJUNCTIVE } struct Adjacency { @@ -16,7 +16,27 @@ struct Graph { } #Represents a operator along with its counters -enum OperatorType { JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD } +enum OperatorType { + JOIN, + MAPJOIN, + EXTRACT, + FILTER, + FORWARD, + GROUPBY, + LIMIT, + SCRIPT, + SELECT, + TABLESCAN, + FILESINK, + REDUCESINK, + UNION, + UDTF, + LATERALVIEWJOIN, + LATERALVIEWFORWARD, + HASHTABLESINK, + HASHTABLEDUMMY, +} + struct Operator { 1: string operatorId, 2: OperatorType operatorType, @@ -41,7 +61,18 @@ struct Task { } # Represents a Stage - unfortunately, it is represented as Task in ql/exec -enum StageType { CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE } +enum StageType { + CONDITIONAL, + COPY, + DDL, + MAPRED, + EXPLAIN, + FETCH, + FUNC, + MAPREDLOCAL, + MOVE, + STATS +} struct Stage { 1: string stageId, diff --git ql/ivy.xml ql/ivy.xml index e72a450..26041b5 100644 --- ql/ivy.xml +++ ql/ivy.xml @@ -3,6 +3,8 @@ - + + + diff --git ql/src/gen-cpp/queryplan_constants.cpp ql/src/gen-cpp/queryplan_constants.cpp new file mode 100644 index 0000000..5bd3cc4 --- /dev/null +++ ql/src/gen-cpp/queryplan_constants.cpp @@ -0,0 +1,16 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "queryplan_constants.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +const queryplanConstants g_queryplan_constants; + +queryplanConstants::queryplanConstants() { +} + +}}} // namespace + diff --git ql/src/gen-cpp/queryplan_constants.h ql/src/gen-cpp/queryplan_constants.h new file mode 100644 index 0000000..871b474 --- /dev/null +++ ql/src/gen-cpp/queryplan_constants.h @@ -0,0 +1,23 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef queryplan_CONSTANTS_H +#define queryplan_CONSTANTS_H + +#include "queryplan_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +class queryplanConstants { + public: + queryplanConstants(); + +}; + +extern const queryplanConstants g_queryplan_constants; + +}}} // namespace + +#endif diff --git ql/src/gen-cpp/queryplan_types.cpp ql/src/gen-cpp/queryplan_types.cpp new file mode 100644 index 0000000..65651af --- /dev/null +++ ql/src/gen-cpp/queryplan_types.cpp @@ -0,0 +1,1075 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#include "queryplan_types.h" + +namespace Apache { namespace Hadoop { namespace Hive { + +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}; + +uint32_t Adjacency::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->node); + this->__isset.node = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->children.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + iprot->readListBegin(_etype3, _size0); + this->children.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += iprot->readString(this->children[_i4]); + } + iprot->readListEnd(); + } + this->__isset.children = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast5; + xfer += iprot->readI32(ecast5); + this->adjacencyType = (AdjacencyType::type)ecast5; + this->__isset.adjacencyType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Adjacency::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Adjacency"); + xfer += oprot->writeFieldBegin("node", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->node); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("children", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->children.size()); + std::vector ::const_iterator _iter6; + for (_iter6 = this->children.begin(); _iter6 != this->children.end(); ++_iter6) + { + xfer += oprot->writeString((*_iter6)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyType", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32((int32_t)this->adjacencyType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Graph::ascii_fingerprint = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; +const uint8_t Graph::binary_fingerprint[16] = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; + +uint32_t Graph::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_I32) { + int32_t ecast7; + xfer += iprot->readI32(ecast7); + this->nodeType = (NodeType::type)ecast7; + this->__isset.nodeType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->roots.clear(); + uint32_t _size8; + ::apache::thrift::protocol::TType _etype11; + iprot->readListBegin(_etype11, _size8); + this->roots.resize(_size8); + uint32_t _i12; + for (_i12 = 0; _i12 < _size8; ++_i12) + { + xfer += iprot->readString(this->roots[_i12]); + } + iprot->readListEnd(); + } + this->__isset.roots = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->adjacencyList.clear(); + uint32_t _size13; + ::apache::thrift::protocol::TType _etype16; + iprot->readListBegin(_etype16, _size13); + this->adjacencyList.resize(_size13); + uint32_t _i17; + for (_i17 = 0; _i17 < _size13; ++_i17) + { + xfer += this->adjacencyList[_i17].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.adjacencyList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Graph::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Graph"); + xfer += oprot->writeFieldBegin("nodeType", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->nodeType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("roots", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->roots.size()); + std::vector ::const_iterator _iter18; + for (_iter18 = this->roots.begin(); _iter18 != this->roots.end(); ++_iter18) + { + xfer += oprot->writeString((*_iter18)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("adjacencyList", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->adjacencyList.size()); + std::vector ::const_iterator _iter19; + for (_iter19 = this->adjacencyList.begin(); _iter19 != this->adjacencyList.end(); ++_iter19) + { + xfer += (*_iter19).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Operator::ascii_fingerprint = "30917C758A752485AF223B697479DE6C"; +const uint8_t Operator::binary_fingerprint[16] = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; + +uint32_t Operator::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->operatorId); + this->__isset.operatorId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast20; + xfer += iprot->readI32(ecast20); + this->operatorType = (OperatorType::type)ecast20; + this->__isset.operatorType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->operatorAttributes.clear(); + uint32_t _size21; + ::apache::thrift::protocol::TType _ktype22; + ::apache::thrift::protocol::TType _vtype23; + iprot->readMapBegin(_ktype22, _vtype23, _size21); + uint32_t _i25; + for (_i25 = 0; _i25 < _size21; ++_i25) + { + std::string _key26; + xfer += iprot->readString(_key26); + std::string& _val27 = this->operatorAttributes[_key26]; + xfer += iprot->readString(_val27); + } + iprot->readMapEnd(); + } + this->__isset.operatorAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->operatorCounters.clear(); + uint32_t _size28; + ::apache::thrift::protocol::TType _ktype29; + ::apache::thrift::protocol::TType _vtype30; + iprot->readMapBegin(_ktype29, _vtype30, _size28); + uint32_t _i32; + for (_i32 = 0; _i32 < _size28; ++_i32) + { + std::string _key33; + xfer += iprot->readString(_key33); + int64_t& _val34 = this->operatorCounters[_key33]; + xfer += iprot->readI64(_val34); + } + iprot->readMapEnd(); + } + this->__isset.operatorCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Operator::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Operator"); + xfer += oprot->writeFieldBegin("operatorId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->operatorId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->operatorType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->operatorAttributes.size()); + std::map ::const_iterator _iter35; + for (_iter35 = this->operatorAttributes.begin(); _iter35 != this->operatorAttributes.end(); ++_iter35) + { + xfer += oprot->writeString(_iter35->first); + xfer += oprot->writeString(_iter35->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("operatorCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->operatorCounters.size()); + std::map ::const_iterator _iter36; + for (_iter36 = this->operatorCounters.begin(); _iter36 != this->operatorCounters.end(); ++_iter36) + { + xfer += oprot->writeString(_iter36->first); + xfer += oprot->writeI64(_iter36->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 5); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Task::ascii_fingerprint = "AC741A136EFA51843AFC3A12F6A793D1"; +const uint8_t Task::binary_fingerprint[16] = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; + +uint32_t Task::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->taskId); + this->__isset.taskId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast37; + xfer += iprot->readI32(ecast37); + this->taskType = (TaskType::type)ecast37; + this->__isset.taskType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->taskAttributes.clear(); + uint32_t _size38; + ::apache::thrift::protocol::TType _ktype39; + ::apache::thrift::protocol::TType _vtype40; + iprot->readMapBegin(_ktype39, _vtype40, _size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) + { + std::string _key43; + xfer += iprot->readString(_key43); + std::string& _val44 = this->taskAttributes[_key43]; + xfer += iprot->readString(_val44); + } + iprot->readMapEnd(); + } + this->__isset.taskAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->taskCounters.clear(); + uint32_t _size45; + ::apache::thrift::protocol::TType _ktype46; + ::apache::thrift::protocol::TType _vtype47; + iprot->readMapBegin(_ktype46, _vtype47, _size45); + uint32_t _i49; + for (_i49 = 0; _i49 < _size45; ++_i49) + { + std::string _key50; + xfer += iprot->readString(_key50); + int64_t& _val51 = this->taskCounters[_key50]; + xfer += iprot->readI64(_val51); + } + iprot->readMapEnd(); + } + this->__isset.taskCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->operatorGraph.read(iprot); + this->__isset.operatorGraph = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->operatorList.clear(); + uint32_t _size52; + ::apache::thrift::protocol::TType _etype55; + iprot->readListBegin(_etype55, _size52); + this->operatorList.resize(_size52); + uint32_t _i56; + for (_i56 = 0; _i56 < _size52; ++_i56) + { + xfer += this->operatorList[_i56].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.operatorList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Task::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Task"); + xfer += oprot->writeFieldBegin("taskId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->taskId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->taskType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->taskAttributes.size()); + std::map ::const_iterator _iter57; + for (_iter57 = this->taskAttributes.begin(); _iter57 != this->taskAttributes.end(); ++_iter57) + { + xfer += oprot->writeString(_iter57->first); + xfer += oprot->writeString(_iter57->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->taskCounters.size()); + std::map ::const_iterator _iter58; + for (_iter58 = this->taskCounters.begin(); _iter58 != this->taskCounters.end(); ++_iter58) + { + xfer += oprot->writeString(_iter58->first); + xfer += oprot->writeI64(_iter58->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + if (this->__isset.operatorGraph) { + xfer += oprot->writeFieldBegin("operatorGraph", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->operatorGraph.write(oprot); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.operatorList) { + xfer += oprot->writeFieldBegin("operatorList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->operatorList.size()); + std::vector ::const_iterator _iter59; + for (_iter59 = this->operatorList.begin(); _iter59 != this->operatorList.end(); ++_iter59) + { + xfer += (*_iter59).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Stage::ascii_fingerprint = "86EA3C7B0690AFED21A3D479E2B32378"; +const uint8_t Stage::binary_fingerprint[16] = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; + +uint32_t Stage::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->stageId); + this->__isset.stageId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast60; + xfer += iprot->readI32(ecast60); + this->stageType = (StageType::type)ecast60; + this->__isset.stageType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->stageAttributes.clear(); + uint32_t _size61; + ::apache::thrift::protocol::TType _ktype62; + ::apache::thrift::protocol::TType _vtype63; + iprot->readMapBegin(_ktype62, _vtype63, _size61); + uint32_t _i65; + for (_i65 = 0; _i65 < _size61; ++_i65) + { + std::string _key66; + xfer += iprot->readString(_key66); + std::string& _val67 = this->stageAttributes[_key66]; + xfer += iprot->readString(_val67); + } + iprot->readMapEnd(); + } + this->__isset.stageAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->stageCounters.clear(); + uint32_t _size68; + ::apache::thrift::protocol::TType _ktype69; + ::apache::thrift::protocol::TType _vtype70; + iprot->readMapBegin(_ktype69, _vtype70, _size68); + uint32_t _i72; + for (_i72 = 0; _i72 < _size68; ++_i72) + { + std::string _key73; + xfer += iprot->readString(_key73); + int64_t& _val74 = this->stageCounters[_key73]; + xfer += iprot->readI64(_val74); + } + iprot->readMapEnd(); + } + this->__isset.stageCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->taskList.clear(); + uint32_t _size75; + ::apache::thrift::protocol::TType _etype78; + iprot->readListBegin(_etype78, _size75); + this->taskList.resize(_size75); + uint32_t _i79; + for (_i79 = 0; _i79 < _size75; ++_i79) + { + xfer += this->taskList[_i79].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.taskList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Stage::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Stage"); + xfer += oprot->writeFieldBegin("stageId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->stageId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageType", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->stageType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->stageAttributes.size()); + std::map ::const_iterator _iter80; + for (_iter80 = this->stageAttributes.begin(); _iter80 != this->stageAttributes.end(); ++_iter80) + { + xfer += oprot->writeString(_iter80->first); + xfer += oprot->writeString(_iter80->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->stageCounters.size()); + std::map ::const_iterator _iter81; + for (_iter81 = this->stageCounters.begin(); _iter81 != this->stageCounters.end(); ++_iter81) + { + xfer += oprot->writeString(_iter81->first); + xfer += oprot->writeI64(_iter81->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("taskList", ::apache::thrift::protocol::T_LIST, 5); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->taskList.size()); + std::vector ::const_iterator _iter82; + for (_iter82 = this->taskList.begin(); _iter82 != this->taskList.end(); ++_iter82) + { + xfer += (*_iter82).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 6); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Query::ascii_fingerprint = "68300D63A5D40F2D17B9A9440FF626C1"; +const uint8_t Query::binary_fingerprint[16] = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; + +uint32_t Query::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->queryId); + this->__isset.queryId = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->queryType); + this->__isset.queryType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->queryAttributes.clear(); + uint32_t _size83; + ::apache::thrift::protocol::TType _ktype84; + ::apache::thrift::protocol::TType _vtype85; + iprot->readMapBegin(_ktype84, _vtype85, _size83); + uint32_t _i87; + for (_i87 = 0; _i87 < _size83; ++_i87) + { + std::string _key88; + xfer += iprot->readString(_key88); + std::string& _val89 = this->queryAttributes[_key88]; + xfer += iprot->readString(_val89); + } + iprot->readMapEnd(); + } + this->__isset.queryAttributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->queryCounters.clear(); + uint32_t _size90; + ::apache::thrift::protocol::TType _ktype91; + ::apache::thrift::protocol::TType _vtype92; + iprot->readMapBegin(_ktype91, _vtype92, _size90); + uint32_t _i94; + for (_i94 = 0; _i94 < _size90; ++_i94) + { + std::string _key95; + xfer += iprot->readString(_key95); + int64_t& _val96 = this->queryCounters[_key95]; + xfer += iprot->readI64(_val96); + } + iprot->readMapEnd(); + } + this->__isset.queryCounters = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->stageGraph.read(iprot); + this->__isset.stageGraph = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->stageList.clear(); + uint32_t _size97; + ::apache::thrift::protocol::TType _etype100; + iprot->readListBegin(_etype100, _size97); + this->stageList.resize(_size97); + uint32_t _i101; + for (_i101 = 0; _i101 < _size97; ++_i101) + { + xfer += this->stageList[_i101].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.stageList = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Query::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Query"); + xfer += oprot->writeFieldBegin("queryId", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->queryId); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryType", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeString(this->queryType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryAttributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, this->queryAttributes.size()); + std::map ::const_iterator _iter102; + for (_iter102 = this->queryAttributes.begin(); _iter102 != this->queryAttributes.end(); ++_iter102) + { + xfer += oprot->writeString(_iter102->first); + xfer += oprot->writeString(_iter102->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("queryCounters", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_I64, this->queryCounters.size()); + std::map ::const_iterator _iter103; + for (_iter103 = this->queryCounters.begin(); _iter103 != this->queryCounters.end(); ++_iter103) + { + xfer += oprot->writeString(_iter103->first); + xfer += oprot->writeI64(_iter103->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageGraph", ::apache::thrift::protocol::T_STRUCT, 5); + xfer += this->stageGraph.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stageList", ::apache::thrift::protocol::T_LIST, 6); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->stageList.size()); + std::vector ::const_iterator _iter104; + for (_iter104 = this->stageList.begin(); _iter104 != this->stageList.end(); ++_iter104) + { + xfer += (*_iter104).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 7); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* QueryPlan::ascii_fingerprint = "3418D1B0C20C288C8406186700B772E3"; +const uint8_t QueryPlan::binary_fingerprint[16] = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; + +uint32_t QueryPlan::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->queries.clear(); + uint32_t _size105; + ::apache::thrift::protocol::TType _etype108; + iprot->readListBegin(_etype108, _size105); + this->queries.resize(_size105); + uint32_t _i109; + for (_i109 = 0; _i109 < _size105; ++_i109) + { + xfer += this->queries[_i109].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.queries = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->done); + this->__isset.done = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->started); + this->__isset.started = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t QueryPlan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("QueryPlan"); + xfer += oprot->writeFieldBegin("queries", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, this->queries.size()); + std::vector ::const_iterator _iter110; + for (_iter110 = this->queries.begin(); _iter110 != this->queries.end(); ++_iter110) + { + xfer += (*_iter110).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("done", ::apache::thrift::protocol::T_BOOL, 2); + xfer += oprot->writeBool(this->done); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("started", ::apache::thrift::protocol::T_BOOL, 3); + xfer += oprot->writeBool(this->started); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +}}} // namespace diff --git ql/src/gen-cpp/queryplan_types.h ql/src/gen-cpp/queryplan_types.h new file mode 100644 index 0000000..4d68815 --- /dev/null +++ ql/src/gen-cpp/queryplan_types.h @@ -0,0 +1,467 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +#ifndef queryplan_TYPES_H +#define queryplan_TYPES_H + +#include +#include +#include +#include + + + +namespace Apache { namespace Hadoop { namespace Hive { + +struct AdjacencyType { + enum type { + CONJUNCTIVE = 0, + DISJUNCTIVE = 1 + }; +}; + +struct NodeType { + enum type { + OPERATOR = 0, + STAGE = 1 + }; +}; + +struct OperatorType { + enum type { + JOIN = 0, + MAPJOIN = 1, + EXTRACT = 2, + FILTER = 3, + FORWARD = 4, + GROUPBY = 5, + LIMIT = 6, + SCRIPT = 7, + SELECT = 8, + TABLESCAN = 9, + FILESINK = 10, + REDUCESINK = 11, + UNION = 12, + UDTF = 13, + LATERALVIEWJOIN = 14, + LATERALVIEWFORWARD = 15, + HASHTABLESINK = 16, + HASHTABLEDUMMY = 17 + }; +}; + +struct TaskType { + enum type { + MAP = 0, + REDUCE = 1, + OTHER = 2 + }; +}; + +struct StageType { + enum type { + CONDITIONAL = 0, + COPY = 1, + DDL = 2, + MAPRED = 3, + EXPLAIN = 4, + FETCH = 5, + FUNC = 6, + MAPREDLOCAL = 7, + MOVE = 8, + STATS = 9 + }; +}; + +typedef struct _Adjacency__isset { + _Adjacency__isset() : node(false), children(false), adjacencyType(false) {} + bool node; + bool children; + bool adjacencyType; +} _Adjacency__isset; + +class Adjacency { + public: + + static const char* ascii_fingerprint; // = "BC4F8C394677A1003AA9F56ED26D8204"; + static const uint8_t binary_fingerprint[16]; // = {0xBC,0x4F,0x8C,0x39,0x46,0x77,0xA1,0x00,0x3A,0xA9,0xF5,0x6E,0xD2,0x6D,0x82,0x04}; + + Adjacency() : node("") { + } + + virtual ~Adjacency() throw() {} + + std::string node; + std::vector children; + AdjacencyType::type adjacencyType; + + _Adjacency__isset __isset; + + bool operator == (const Adjacency & rhs) const + { + if (!(node == rhs.node)) + return false; + if (!(children == rhs.children)) + return false; + if (!(adjacencyType == rhs.adjacencyType)) + return false; + return true; + } + bool operator != (const Adjacency &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Adjacency & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Graph__isset { + _Graph__isset() : nodeType(false), roots(false), adjacencyList(false) {} + bool nodeType; + bool roots; + bool adjacencyList; +} _Graph__isset; + +class Graph { + public: + + static const char* ascii_fingerprint; // = "1F7FB604B3EF8F7AFB5DEAD15F2FC0B5"; + static const uint8_t binary_fingerprint[16]; // = {0x1F,0x7F,0xB6,0x04,0xB3,0xEF,0x8F,0x7A,0xFB,0x5D,0xEA,0xD1,0x5F,0x2F,0xC0,0xB5}; + + Graph() { + } + + virtual ~Graph() throw() {} + + NodeType::type nodeType; + std::vector roots; + std::vector adjacencyList; + + _Graph__isset __isset; + + bool operator == (const Graph & rhs) const + { + if (!(nodeType == rhs.nodeType)) + return false; + if (!(roots == rhs.roots)) + return false; + if (!(adjacencyList == rhs.adjacencyList)) + return false; + return true; + } + bool operator != (const Graph &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Graph & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Operator__isset { + _Operator__isset() : operatorId(false), operatorType(false), operatorAttributes(false), operatorCounters(false), done(false), started(false) {} + bool operatorId; + bool operatorType; + bool operatorAttributes; + bool operatorCounters; + bool done; + bool started; +} _Operator__isset; + +class Operator { + public: + + static const char* ascii_fingerprint; // = "30917C758A752485AF223B697479DE6C"; + static const uint8_t binary_fingerprint[16]; // = {0x30,0x91,0x7C,0x75,0x8A,0x75,0x24,0x85,0xAF,0x22,0x3B,0x69,0x74,0x79,0xDE,0x6C}; + + Operator() : operatorId(""), done(0), started(0) { + } + + virtual ~Operator() throw() {} + + std::string operatorId; + OperatorType::type operatorType; + std::map operatorAttributes; + std::map operatorCounters; + bool done; + bool started; + + _Operator__isset __isset; + + bool operator == (const Operator & rhs) const + { + if (!(operatorId == rhs.operatorId)) + return false; + if (!(operatorType == rhs.operatorType)) + return false; + if (!(operatorAttributes == rhs.operatorAttributes)) + return false; + if (!(operatorCounters == rhs.operatorCounters)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Operator &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Operator & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Task__isset { + _Task__isset() : taskId(false), taskType(false), taskAttributes(false), taskCounters(false), operatorGraph(false), operatorList(false), done(false), started(false) {} + bool taskId; + bool taskType; + bool taskAttributes; + bool taskCounters; + bool operatorGraph; + bool operatorList; + bool done; + bool started; +} _Task__isset; + +class Task { + public: + + static const char* ascii_fingerprint; // = "AC741A136EFA51843AFC3A12F6A793D1"; + static const uint8_t binary_fingerprint[16]; // = {0xAC,0x74,0x1A,0x13,0x6E,0xFA,0x51,0x84,0x3A,0xFC,0x3A,0x12,0xF6,0xA7,0x93,0xD1}; + + Task() : taskId(""), done(0), started(0) { + } + + virtual ~Task() throw() {} + + std::string taskId; + TaskType::type taskType; + std::map taskAttributes; + std::map taskCounters; + Graph operatorGraph; + std::vector operatorList; + bool done; + bool started; + + _Task__isset __isset; + + bool operator == (const Task & rhs) const + { + if (!(taskId == rhs.taskId)) + return false; + if (!(taskType == rhs.taskType)) + return false; + if (!(taskAttributes == rhs.taskAttributes)) + return false; + if (!(taskCounters == rhs.taskCounters)) + return false; + if (__isset.operatorGraph != rhs.__isset.operatorGraph) + return false; + else if (__isset.operatorGraph && !(operatorGraph == rhs.operatorGraph)) + return false; + if (__isset.operatorList != rhs.__isset.operatorList) + return false; + else if (__isset.operatorList && !(operatorList == rhs.operatorList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Task &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Task & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Stage__isset { + _Stage__isset() : stageId(false), stageType(false), stageAttributes(false), stageCounters(false), taskList(false), done(false), started(false) {} + bool stageId; + bool stageType; + bool stageAttributes; + bool stageCounters; + bool taskList; + bool done; + bool started; +} _Stage__isset; + +class Stage { + public: + + static const char* ascii_fingerprint; // = "86EA3C7B0690AFED21A3D479E2B32378"; + static const uint8_t binary_fingerprint[16]; // = {0x86,0xEA,0x3C,0x7B,0x06,0x90,0xAF,0xED,0x21,0xA3,0xD4,0x79,0xE2,0xB3,0x23,0x78}; + + Stage() : stageId(""), done(0), started(0) { + } + + virtual ~Stage() throw() {} + + std::string stageId; + StageType::type stageType; + std::map stageAttributes; + std::map stageCounters; + std::vector taskList; + bool done; + bool started; + + _Stage__isset __isset; + + bool operator == (const Stage & rhs) const + { + if (!(stageId == rhs.stageId)) + return false; + if (!(stageType == rhs.stageType)) + return false; + if (!(stageAttributes == rhs.stageAttributes)) + return false; + if (!(stageCounters == rhs.stageCounters)) + return false; + if (!(taskList == rhs.taskList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Stage &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Stage & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Query__isset { + _Query__isset() : queryId(false), queryType(false), queryAttributes(false), queryCounters(false), stageGraph(false), stageList(false), done(false), started(false) {} + bool queryId; + bool queryType; + bool queryAttributes; + bool queryCounters; + bool stageGraph; + bool stageList; + bool done; + bool started; +} _Query__isset; + +class Query { + public: + + static const char* ascii_fingerprint; // = "68300D63A5D40F2D17B9A9440FF626C1"; + static const uint8_t binary_fingerprint[16]; // = {0x68,0x30,0x0D,0x63,0xA5,0xD4,0x0F,0x2D,0x17,0xB9,0xA9,0x44,0x0F,0xF6,0x26,0xC1}; + + Query() : queryId(""), queryType(""), done(0), started(0) { + } + + virtual ~Query() throw() {} + + std::string queryId; + std::string queryType; + std::map queryAttributes; + std::map queryCounters; + Graph stageGraph; + std::vector stageList; + bool done; + bool started; + + _Query__isset __isset; + + bool operator == (const Query & rhs) const + { + if (!(queryId == rhs.queryId)) + return false; + if (!(queryType == rhs.queryType)) + return false; + if (!(queryAttributes == rhs.queryAttributes)) + return false; + if (!(queryCounters == rhs.queryCounters)) + return false; + if (!(stageGraph == rhs.stageGraph)) + return false; + if (!(stageList == rhs.stageList)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const Query &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Query & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _QueryPlan__isset { + _QueryPlan__isset() : queries(false), done(false), started(false) {} + bool queries; + bool done; + bool started; +} _QueryPlan__isset; + +class QueryPlan { + public: + + static const char* ascii_fingerprint; // = "3418D1B0C20C288C8406186700B772E3"; + static const uint8_t binary_fingerprint[16]; // = {0x34,0x18,0xD1,0xB0,0xC2,0x0C,0x28,0x8C,0x84,0x06,0x18,0x67,0x00,0xB7,0x72,0xE3}; + + QueryPlan() : done(0), started(0) { + } + + virtual ~QueryPlan() throw() {} + + std::vector queries; + bool done; + bool started; + + _QueryPlan__isset __isset; + + bool operator == (const QueryPlan & rhs) const + { + if (!(queries == rhs.queries)) + return false; + if (!(done == rhs.done)) + return false; + if (!(started == rhs.started)) + return false; + return true; + } + bool operator != (const QueryPlan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const QueryPlan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +}}} // namespace + +#endif diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java index 742f742..8728260 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Adjacency.java @@ -9,44 +9,115 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Adjacency implements TBase, java.io.Serializable, Cloneable { +public class Adjacency implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Adjacency"); + private static final TField NODE_FIELD_DESC = new TField("node", TType.STRING, (short)1); private static final TField CHILDREN_FIELD_DESC = new TField("children", TType.LIST, (short)2); private static final TField ADJACENCY_TYPE_FIELD_DESC = new TField("adjacencyType", TType.I32, (short)3); private String node; - public static final int NODE = 1; private List children; - public static final int CHILDREN = 2; - private int adjacencyType; - public static final int ADJACENCYTYPE = 3; + private AdjacencyType adjacencyType; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NODE((short)1, "node"), + CHILDREN((short)2, "children"), + /** + * + * @see AdjacencyType + */ + ADJACENCY_TYPE((short)3, "adjacencyType"); + + 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: // NODE + return NODE; + case 2: // CHILDREN + return CHILDREN; + case 3: // ADJACENCY_TYPE + return ADJACENCY_TYPE; + 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; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean adjacencyType = false; + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NODE, new FieldMetaData("node", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NODE, new FieldMetaData("node", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(CHILDREN, new FieldMetaData("children", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.CHILDREN, new FieldMetaData("children", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(ADJACENCYTYPE, new FieldMetaData("adjacencyType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { + tmpMap.put(_Fields.ADJACENCY_TYPE, new FieldMetaData("adjacencyType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, AdjacencyType.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Adjacency.class, metaDataMap); } @@ -56,13 +127,12 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { public Adjacency( String node, List children, - int adjacencyType) + AdjacencyType adjacencyType) { this(); this.node = node; this.children = children; this.adjacencyType = adjacencyType; - this.__isset.adjacencyType = true; } /** @@ -79,15 +149,22 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { } this.children = __this__children; } - __isset.adjacencyType = other.__isset.adjacencyType; - this.adjacencyType = other.adjacencyType; + if (other.isSetAdjacencyType()) { + this.adjacencyType = other.adjacencyType; + } } - @Override - public Adjacency clone() { + public Adjacency deepCopy() { return new Adjacency(this); } + @Override + public void clear() { + this.node = null; + this.children = null; + this.adjacencyType = null; + } + public String getNode() { return this.node; } @@ -100,11 +177,17 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { this.node = null; } - // Returns true if field node is set (has been asigned a value) and false otherwise + /** Returns true if field node is set (has been asigned a value) and false otherwise */ public boolean isSetNode() { return this.node != null; } + public void setNodeIsSet(boolean value) { + if (!value) { + this.node = null; + } + } + public int getChildrenSize() { return (this.children == null) ? 0 : this.children.size(); } @@ -132,31 +215,50 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { this.children = null; } - // Returns true if field children is set (has been asigned a value) and false otherwise + /** Returns true if field children is set (has been asigned a value) and false otherwise */ public boolean isSetChildren() { return this.children != null; } - public int getAdjacencyType() { + public void setChildrenIsSet(boolean value) { + if (!value) { + this.children = null; + } + } + + /** + * + * @see AdjacencyType + */ + public AdjacencyType getAdjacencyType() { return this.adjacencyType; } - public void setAdjacencyType(int adjacencyType) { + /** + * + * @see AdjacencyType + */ + public void setAdjacencyType(AdjacencyType adjacencyType) { this.adjacencyType = adjacencyType; - this.__isset.adjacencyType = true; } public void unsetAdjacencyType() { - this.__isset.adjacencyType = false; + this.adjacencyType = null; } - // Returns true if field adjacencyType is set (has been asigned a value) and false otherwise + /** Returns true if field adjacencyType is set (has been asigned a value) and false otherwise */ public boolean isSetAdjacencyType() { - return this.__isset.adjacencyType; + return this.adjacencyType != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setAdjacencyTypeIsSet(boolean value) { + if (!value) { + this.adjacencyType = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case NODE: if (value == null) { unsetNode(); @@ -173,47 +275,47 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { } break; - case ADJACENCYTYPE: + case ADJACENCY_TYPE: if (value == null) { unsetAdjacencyType(); } else { - setAdjacencyType((Integer)value); + setAdjacencyType((AdjacencyType)value); } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case NODE: return getNode(); case CHILDREN: return getChildren(); - case ADJACENCYTYPE: + case ADJACENCY_TYPE: return getAdjacencyType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case NODE: return isSetNode(); case CHILDREN: return isSetChildren(); - case ADJACENCYTYPE: + case ADJACENCY_TYPE: return isSetAdjacencyType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -247,12 +349,12 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { return false; } - boolean this_present_adjacencyType = true; - boolean that_present_adjacencyType = true; + boolean this_present_adjacencyType = true && this.isSetAdjacencyType(); + boolean that_present_adjacencyType = true && that.isSetAdjacencyType(); if (this_present_adjacencyType || that_present_adjacencyType) { if (!(this_present_adjacencyType && that_present_adjacencyType)) return false; - if (this.adjacencyType != that.adjacencyType) + if (!this.adjacencyType.equals(that.adjacencyType)) return false; } @@ -264,6 +366,51 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Adjacency other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Adjacency typedOther = (Adjacency)other; + + lastComparison = Boolean.valueOf(isSetNode()).compareTo(typedOther.isSetNode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNode()) { + lastComparison = TBaseHelper.compareTo(this.node, typedOther.node); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetChildren()).compareTo(typedOther.isSetChildren()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetChildren()) { + lastComparison = TBaseHelper.compareTo(this.children, typedOther.children); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAdjacencyType()).compareTo(typedOther.isSetAdjacencyType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAdjacencyType()) { + lastComparison = TBaseHelper.compareTo(this.adjacencyType, typedOther.adjacencyType); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -273,16 +420,15 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NODE: + switch (field.id) { + case 1: // NODE if (field.type == TType.STRING) { this.node = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case CHILDREN: + case 2: // CHILDREN if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); @@ -299,22 +445,19 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case ADJACENCYTYPE: + case 3: // ADJACENCY_TYPE if (field.type == TType.I32) { - this.adjacencyType = iprot.readI32(); - this.__isset.adjacencyType = true; + this.adjacencyType = AdjacencyType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -331,16 +474,19 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(CHILDREN_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.children.size())); - for (String _iter3 : this.children) { + for (String _iter3 : this.children) + { oprot.writeString(_iter3); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } - oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); - oprot.writeI32(this.adjacencyType); - oprot.writeFieldEnd(); + if (this.adjacencyType != null) { + oprot.writeFieldBegin(ADJACENCY_TYPE_FIELD_DESC); + oprot.writeI32(this.adjacencyType.getValue()); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -367,14 +513,10 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { first = false; if (!first) sb.append(", "); sb.append("adjacencyType:"); - String adjacencyType_name = AdjacencyType.VALUES_TO_NAMES.get(this.adjacencyType); - if (adjacencyType_name != null) { - sb.append(adjacencyType_name); - sb.append(" ("); - } - sb.append(this.adjacencyType); - if (adjacencyType_name != null) { - sb.append(")"); + if (this.adjacencyType == null) { + sb.append("null"); + } else { + sb.append(this.adjacencyType); } first = false; sb.append(")"); @@ -383,10 +525,6 @@ public class Adjacency implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetAdjacencyType() && !AdjacencyType.VALID_VALUES.contains(adjacencyType)){ - throw new TProtocolException("The field 'adjacencyType' has been assigned the invalid value " + adjacencyType); - } } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java index 24e04e4..cfbd3e4 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/AdjacencyType.java @@ -6,23 +6,39 @@ package org.apache.hadoop.hive.ql.plan.api; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.thrift.IntRangeSet; import java.util.Map; import java.util.HashMap; +import org.apache.thrift.TEnum; -public class AdjacencyType { - public static final int CONJUNCTIVE = 0; - public static final int DISJUNCTIVE = 1; +public enum AdjacencyType implements TEnum { + CONJUNCTIVE(0), + DISJUNCTIVE(1); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - CONJUNCTIVE, - DISJUNCTIVE ); + private final int value; - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(CONJUNCTIVE, "CONJUNCTIVE"); - put(DISJUNCTIVE, "DISJUNCTIVE"); - }}; + private AdjacencyType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static AdjacencyType findByValue(int value) { + switch (value) { + case 0: + return CONJUNCTIVE; + case 1: + return DISJUNCTIVE; + default: + return null; + } + } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java index 79719ef..028addf 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Graph.java @@ -9,45 +9,116 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Graph implements TBase, java.io.Serializable, Cloneable { +public class Graph implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Graph"); + private static final TField NODE_TYPE_FIELD_DESC = new TField("nodeType", TType.I32, (short)1); private static final TField ROOTS_FIELD_DESC = new TField("roots", TType.LIST, (short)2); private static final TField ADJACENCY_LIST_FIELD_DESC = new TField("adjacencyList", TType.LIST, (short)3); - private int nodeType; - public static final int NODETYPE = 1; + private NodeType nodeType; private List roots; - public static final int ROOTS = 2; private List adjacencyList; - public static final int ADJACENCYLIST = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean nodeType = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + /** + * + * @see NodeType + */ + NODE_TYPE((short)1, "nodeType"), + ROOTS((short)2, "roots"), + ADJACENCY_LIST((short)3, "adjacencyList"); + + 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: // NODE_TYPE + return NODE_TYPE; + case 2: // ROOTS + return ROOTS; + case 3: // ADJACENCY_LIST + return ADJACENCY_LIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NODETYPE, new FieldMetaData("nodeType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(ROOTS, new FieldMetaData("roots", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NODE_TYPE, new FieldMetaData("nodeType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, NodeType.class))); + tmpMap.put(_Fields.ROOTS, new FieldMetaData("roots", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(ADJACENCYLIST, new FieldMetaData("adjacencyList", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.ADJACENCY_LIST, new FieldMetaData("adjacencyList", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Adjacency.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Graph.class, metaDataMap); } @@ -55,13 +126,12 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } public Graph( - int nodeType, + NodeType nodeType, List roots, List adjacencyList) { this(); this.nodeType = nodeType; - this.__isset.nodeType = true; this.roots = roots; this.adjacencyList = adjacencyList; } @@ -70,8 +140,9 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { * Performs a deep copy on other. */ public Graph(Graph other) { - __isset.nodeType = other.__isset.nodeType; - this.nodeType = other.nodeType; + if (other.isSetNodeType()) { + this.nodeType = other.nodeType; + } if (other.isSetRoots()) { List __this__roots = new ArrayList(); for (String other_element : other.roots) { @@ -88,27 +159,46 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } } - @Override - public Graph clone() { + public Graph deepCopy() { return new Graph(this); } - public int getNodeType() { + @Override + public void clear() { + this.nodeType = null; + this.roots = null; + this.adjacencyList = null; + } + + /** + * + * @see NodeType + */ + public NodeType getNodeType() { return this.nodeType; } - public void setNodeType(int nodeType) { + /** + * + * @see NodeType + */ + public void setNodeType(NodeType nodeType) { this.nodeType = nodeType; - this.__isset.nodeType = true; } public void unsetNodeType() { - this.__isset.nodeType = false; + this.nodeType = null; } - // Returns true if field nodeType is set (has been asigned a value) and false otherwise + /** Returns true if field nodeType is set (has been asigned a value) and false otherwise */ public boolean isSetNodeType() { - return this.__isset.nodeType; + return this.nodeType != null; + } + + public void setNodeTypeIsSet(boolean value) { + if (!value) { + this.nodeType = null; + } } public int getRootsSize() { @@ -138,11 +228,17 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { this.roots = null; } - // Returns true if field roots is set (has been asigned a value) and false otherwise + /** Returns true if field roots is set (has been asigned a value) and false otherwise */ public boolean isSetRoots() { return this.roots != null; } + public void setRootsIsSet(boolean value) { + if (!value) { + this.roots = null; + } + } + public int getAdjacencyListSize() { return (this.adjacencyList == null) ? 0 : this.adjacencyList.size(); } @@ -170,18 +266,24 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { this.adjacencyList = null; } - // Returns true if field adjacencyList is set (has been asigned a value) and false otherwise + /** Returns true if field adjacencyList is set (has been asigned a value) and false otherwise */ public boolean isSetAdjacencyList() { return this.adjacencyList != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NODETYPE: + public void setAdjacencyListIsSet(boolean value) { + if (!value) { + this.adjacencyList = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NODE_TYPE: if (value == null) { unsetNodeType(); } else { - setNodeType((Integer)value); + setNodeType((NodeType)value); } break; @@ -193,7 +295,7 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } break; - case ADJACENCYLIST: + case ADJACENCY_LIST: if (value == null) { unsetAdjacencyList(); } else { @@ -201,39 +303,39 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NODETYPE: + public Object getFieldValue(_Fields field) { + switch (field) { + case NODE_TYPE: return getNodeType(); case ROOTS: return getRoots(); - case ADJACENCYLIST: + case ADJACENCY_LIST: return getAdjacencyList(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NODETYPE: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NODE_TYPE: return isSetNodeType(); case ROOTS: return isSetRoots(); - case ADJACENCYLIST: + case ADJACENCY_LIST: return isSetAdjacencyList(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -249,12 +351,12 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { if (that == null) return false; - boolean this_present_nodeType = true; - boolean that_present_nodeType = true; + boolean this_present_nodeType = true && this.isSetNodeType(); + boolean that_present_nodeType = true && that.isSetNodeType(); if (this_present_nodeType || that_present_nodeType) { if (!(this_present_nodeType && that_present_nodeType)) return false; - if (this.nodeType != that.nodeType) + if (!this.nodeType.equals(that.nodeType)) return false; } @@ -284,6 +386,51 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Graph other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Graph typedOther = (Graph)other; + + lastComparison = Boolean.valueOf(isSetNodeType()).compareTo(typedOther.isSetNodeType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNodeType()) { + lastComparison = TBaseHelper.compareTo(this.nodeType, typedOther.nodeType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRoots()).compareTo(typedOther.isSetRoots()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRoots()) { + lastComparison = TBaseHelper.compareTo(this.roots, typedOther.roots); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAdjacencyList()).compareTo(typedOther.isSetAdjacencyList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAdjacencyList()) { + lastComparison = TBaseHelper.compareTo(this.adjacencyList, typedOther.adjacencyList); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -293,17 +440,15 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NODETYPE: + switch (field.id) { + case 1: // NODE_TYPE if (field.type == TType.I32) { - this.nodeType = iprot.readI32(); - this.__isset.nodeType = true; + this.nodeType = NodeType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; - case ROOTS: + case 2: // ROOTS if (field.type == TType.LIST) { { TList _list4 = iprot.readListBegin(); @@ -320,7 +465,7 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case ADJACENCYLIST: + case 3: // ADJACENCY_LIST if (field.type == TType.LIST) { { TList _list7 = iprot.readListBegin(); @@ -340,12 +485,10 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -353,14 +496,17 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { validate(); oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); - oprot.writeI32(this.nodeType); - oprot.writeFieldEnd(); + if (this.nodeType != null) { + oprot.writeFieldBegin(NODE_TYPE_FIELD_DESC); + oprot.writeI32(this.nodeType.getValue()); + oprot.writeFieldEnd(); + } if (this.roots != null) { oprot.writeFieldBegin(ROOTS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.roots.size())); - for (String _iter10 : this.roots) { + for (String _iter10 : this.roots) + { oprot.writeString(_iter10); } oprot.writeListEnd(); @@ -371,7 +517,8 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(ADJACENCY_LIST_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.adjacencyList.size())); - for (Adjacency _iter11 : this.adjacencyList) { + for (Adjacency _iter11 : this.adjacencyList) + { _iter11.write(oprot); } oprot.writeListEnd(); @@ -388,14 +535,10 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { boolean first = true; sb.append("nodeType:"); - String nodeType_name = NodeType.VALUES_TO_NAMES.get(this.nodeType); - if (nodeType_name != null) { - sb.append(nodeType_name); - sb.append(" ("); - } - sb.append(this.nodeType); - if (nodeType_name != null) { - sb.append(")"); + if (this.nodeType == null) { + sb.append("null"); + } else { + sb.append(this.nodeType); } first = false; if (!first) sb.append(", "); @@ -420,10 +563,6 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetNodeType() && !NodeType.VALID_VALUES.contains(nodeType)){ - throw new TProtocolException("The field 'nodeType' has been assigned the invalid value " + nodeType); - } } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java index 9a2747e..6174d6e 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/NodeType.java @@ -6,23 +6,39 @@ package org.apache.hadoop.hive.ql.plan.api; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.thrift.IntRangeSet; import java.util.Map; import java.util.HashMap; +import org.apache.thrift.TEnum; -public class NodeType { - public static final int OPERATOR = 0; - public static final int STAGE = 1; +public enum NodeType implements TEnum { + OPERATOR(0), + STAGE(1); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - OPERATOR, - STAGE ); + private final int value; - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(OPERATOR, "OPERATOR"); - put(STAGE, "STAGE"); - }}; + private NodeType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static NodeType findByValue(int value) { + switch (value) { + case 0: + return OPERATOR; + case 1: + return STAGE; + default: + return null; + } + } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java index ff6d61f..1229724 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Operator.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Operator implements TBase, java.io.Serializable, Cloneable { +public class Operator implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Operator"); + private static final TField OPERATOR_ID_FIELD_DESC = new TField("operatorId", TType.STRING, (short)1); private static final TField OPERATOR_TYPE_FIELD_DESC = new TField("operatorType", TType.I32, (short)2); private static final TField OPERATOR_ATTRIBUTES_FIELD_DESC = new TField("operatorAttributes", TType.MAP, (short)3); @@ -28,45 +37,114 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)6); private String operatorId; - public static final int OPERATORID = 1; - private int operatorType; - public static final int OPERATORTYPE = 2; + private OperatorType operatorType; private Map operatorAttributes; - public static final int OPERATORATTRIBUTES = 3; private Map operatorCounters; - public static final int OPERATORCOUNTERS = 4; private boolean done; - public static final int DONE = 5; private boolean started; - public static final int STARTED = 6; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean operatorType = false; - public boolean done = false; - public boolean started = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + OPERATOR_ID((short)1, "operatorId"), + /** + * + * @see OperatorType + */ + OPERATOR_TYPE((short)2, "operatorType"), + OPERATOR_ATTRIBUTES((short)3, "operatorAttributes"), + OPERATOR_COUNTERS((short)4, "operatorCounters"), + DONE((short)5, "done"), + STARTED((short)6, "started"); + + 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: // OPERATOR_ID + return OPERATOR_ID; + case 2: // OPERATOR_TYPE + return OPERATOR_TYPE; + case 3: // OPERATOR_ATTRIBUTES + return OPERATOR_ATTRIBUTES; + case 4: // OPERATOR_COUNTERS + return OPERATOR_COUNTERS; + case 5: // DONE + return DONE; + case 6: // STARTED + return STARTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(OPERATORID, new FieldMetaData("operatorId", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DONE_ISSET_ID = 0; + private static final int __STARTED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.OPERATOR_ID, new FieldMetaData("operatorId", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(OPERATORTYPE, new FieldMetaData("operatorType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(OPERATORATTRIBUTES, new FieldMetaData("operatorAttributes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.OPERATOR_TYPE, new FieldMetaData("operatorType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, OperatorType.class))); + tmpMap.put(_Fields.OPERATOR_ATTRIBUTES, new FieldMetaData("operatorAttributes", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(OPERATORCOUNTERS, new FieldMetaData("operatorCounters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.OPERATOR_COUNTERS, new FieldMetaData("operatorCounters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.I64)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Operator.class, metaDataMap); } @@ -75,7 +153,7 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { public Operator( String operatorId, - int operatorType, + OperatorType operatorType, Map operatorAttributes, Map operatorCounters, boolean done, @@ -84,24 +162,26 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { this(); this.operatorId = operatorId; this.operatorType = operatorType; - this.__isset.operatorType = true; this.operatorAttributes = operatorAttributes; this.operatorCounters = operatorCounters; this.done = done; - this.__isset.done = true; + setDoneIsSet(true); this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } /** * Performs a deep copy on other. */ public Operator(Operator other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetOperatorId()) { this.operatorId = other.operatorId; } - __isset.operatorType = other.__isset.operatorType; - this.operatorType = other.operatorType; + if (other.isSetOperatorType()) { + this.operatorType = other.operatorType; + } if (other.isSetOperatorAttributes()) { Map __this__operatorAttributes = new HashMap(); for (Map.Entry other_element : other.operatorAttributes.entrySet()) { @@ -132,17 +212,26 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { } this.operatorCounters = __this__operatorCounters; } - __isset.done = other.__isset.done; this.done = other.done; - __isset.started = other.__isset.started; this.started = other.started; } - @Override - public Operator clone() { + public Operator deepCopy() { return new Operator(this); } + @Override + public void clear() { + this.operatorId = null; + this.operatorType = null; + this.operatorAttributes = null; + this.operatorCounters = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + public String getOperatorId() { return this.operatorId; } @@ -155,27 +244,46 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { this.operatorId = null; } - // Returns true if field operatorId is set (has been asigned a value) and false otherwise + /** Returns true if field operatorId is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorId() { return this.operatorId != null; } - public int getOperatorType() { + public void setOperatorIdIsSet(boolean value) { + if (!value) { + this.operatorId = null; + } + } + + /** + * + * @see OperatorType + */ + public OperatorType getOperatorType() { return this.operatorType; } - public void setOperatorType(int operatorType) { + /** + * + * @see OperatorType + */ + public void setOperatorType(OperatorType operatorType) { this.operatorType = operatorType; - this.__isset.operatorType = true; } public void unsetOperatorType() { - this.__isset.operatorType = false; + this.operatorType = null; } - // Returns true if field operatorType is set (has been asigned a value) and false otherwise + /** Returns true if field operatorType is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorType() { - return this.__isset.operatorType; + return this.operatorType != null; + } + + public void setOperatorTypeIsSet(boolean value) { + if (!value) { + this.operatorType = null; + } } public int getOperatorAttributesSize() { @@ -201,11 +309,17 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { this.operatorAttributes = null; } - // Returns true if field operatorAttributes is set (has been asigned a value) and false otherwise + /** Returns true if field operatorAttributes is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorAttributes() { return this.operatorAttributes != null; } + public void setOperatorAttributesIsSet(boolean value) { + if (!value) { + this.operatorAttributes = null; + } + } + public int getOperatorCountersSize() { return (this.operatorCounters == null) ? 0 : this.operatorCounters.size(); } @@ -229,27 +343,37 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { this.operatorCounters = null; } - // Returns true if field operatorCounters is set (has been asigned a value) and false otherwise + /** Returns true if field operatorCounters is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorCounters() { return this.operatorCounters != null; } + public void setOperatorCountersIsSet(boolean value) { + if (!value) { + this.operatorCounters = null; + } + } + public boolean isDone() { return this.done; } public void setDone(boolean done) { this.done = done; - this.__isset.done = true; + setDoneIsSet(true); } public void unsetDone() { - this.__isset.done = false; + __isset_bit_vector.clear(__DONE_ISSET_ID); } - // Returns true if field done is set (has been asigned a value) and false otherwise + /** Returns true if field done is set (has been asigned a value) and false otherwise */ public boolean isSetDone() { - return this.__isset.done; + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); } public boolean isStarted() { @@ -258,21 +382,25 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { public void setStarted(boolean started) { this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } public void unsetStarted() { - this.__isset.started = false; + __isset_bit_vector.clear(__STARTED_ISSET_ID); } - // Returns true if field started is set (has been asigned a value) and false otherwise + /** Returns true if field started is set (has been asigned a value) and false otherwise */ public boolean isSetStarted() { - return this.__isset.started; + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case OPERATORID: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OPERATOR_ID: if (value == null) { unsetOperatorId(); } else { @@ -280,15 +408,15 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORTYPE: + case OPERATOR_TYPE: if (value == null) { unsetOperatorType(); } else { - setOperatorType((Integer)value); + setOperatorType((OperatorType)value); } break; - case OPERATORATTRIBUTES: + case OPERATOR_ATTRIBUTES: if (value == null) { unsetOperatorAttributes(); } else { @@ -296,7 +424,7 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORCOUNTERS: + case OPERATOR_COUNTERS: if (value == null) { unsetOperatorCounters(); } else { @@ -320,23 +448,21 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case OPERATORID: + public Object getFieldValue(_Fields field) { + switch (field) { + case OPERATOR_ID: return getOperatorId(); - case OPERATORTYPE: + case OPERATOR_TYPE: return getOperatorType(); - case OPERATORATTRIBUTES: + case OPERATOR_ATTRIBUTES: return getOperatorAttributes(); - case OPERATORCOUNTERS: + case OPERATOR_COUNTERS: return getOperatorCounters(); case DONE: @@ -345,29 +471,31 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { case STARTED: return new Boolean(isStarted()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case OPERATORID: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case OPERATOR_ID: return isSetOperatorId(); - case OPERATORTYPE: + case OPERATOR_TYPE: return isSetOperatorType(); - case OPERATORATTRIBUTES: + case OPERATOR_ATTRIBUTES: return isSetOperatorAttributes(); - case OPERATORCOUNTERS: + case OPERATOR_COUNTERS: return isSetOperatorCounters(); case DONE: return isSetDone(); case STARTED: return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -392,12 +520,12 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { return false; } - boolean this_present_operatorType = true; - boolean that_present_operatorType = true; + boolean this_present_operatorType = true && this.isSetOperatorType(); + boolean that_present_operatorType = true && that.isSetOperatorType(); if (this_present_operatorType || that_present_operatorType) { if (!(this_present_operatorType && that_present_operatorType)) return false; - if (this.operatorType != that.operatorType) + if (!this.operatorType.equals(that.operatorType)) return false; } @@ -445,6 +573,81 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Operator other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Operator typedOther = (Operator)other; + + lastComparison = Boolean.valueOf(isSetOperatorId()).compareTo(typedOther.isSetOperatorId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorId()) { + lastComparison = TBaseHelper.compareTo(this.operatorId, typedOther.operatorId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorType()).compareTo(typedOther.isSetOperatorType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorType()) { + lastComparison = TBaseHelper.compareTo(this.operatorType, typedOther.operatorType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorAttributes()).compareTo(typedOther.isSetOperatorAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorAttributes()) { + lastComparison = TBaseHelper.compareTo(this.operatorAttributes, typedOther.operatorAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorCounters()).compareTo(typedOther.isSetOperatorCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorCounters()) { + lastComparison = TBaseHelper.compareTo(this.operatorCounters, typedOther.operatorCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -454,24 +657,22 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case OPERATORID: + switch (field.id) { + case 1: // OPERATOR_ID if (field.type == TType.STRING) { this.operatorId = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case OPERATORTYPE: + case 2: // OPERATOR_TYPE if (field.type == TType.I32) { - this.operatorType = iprot.readI32(); - this.__isset.operatorType = true; + this.operatorType = OperatorType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; - case OPERATORATTRIBUTES: + case 3: // OPERATOR_ATTRIBUTES if (field.type == TType.MAP) { { TMap _map12 = iprot.readMapBegin(); @@ -490,7 +691,7 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case OPERATORCOUNTERS: + case 4: // OPERATOR_COUNTERS if (field.type == TType.MAP) { { TMap _map16 = iprot.readMapBegin(); @@ -509,30 +710,28 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DONE: + case 5: // DONE if (field.type == TType.BOOL) { this.done = iprot.readBool(); - this.__isset.done = true; + setDoneIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STARTED: + case 6: // STARTED if (field.type == TType.BOOL) { this.started = iprot.readBool(); - this.__isset.started = true; + setStartedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -545,14 +744,17 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { oprot.writeString(this.operatorId); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); - oprot.writeI32(this.operatorType); - oprot.writeFieldEnd(); + if (this.operatorType != null) { + oprot.writeFieldBegin(OPERATOR_TYPE_FIELD_DESC); + oprot.writeI32(this.operatorType.getValue()); + oprot.writeFieldEnd(); + } if (this.operatorAttributes != null) { oprot.writeFieldBegin(OPERATOR_ATTRIBUTES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.operatorAttributes.size())); - for (Map.Entry _iter20 : this.operatorAttributes.entrySet()) { + for (Map.Entry _iter20 : this.operatorAttributes.entrySet()) + { oprot.writeString(_iter20.getKey()); oprot.writeString(_iter20.getValue()); } @@ -564,7 +766,8 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(OPERATOR_COUNTERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.operatorCounters.size())); - for (Map.Entry _iter21 : this.operatorCounters.entrySet()) { + for (Map.Entry _iter21 : this.operatorCounters.entrySet()) + { oprot.writeString(_iter21.getKey()); oprot.writeI64(_iter21.getValue()); } @@ -596,14 +799,10 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { first = false; if (!first) sb.append(", "); sb.append("operatorType:"); - String operatorType_name = OperatorType.VALUES_TO_NAMES.get(this.operatorType); - if (operatorType_name != null) { - sb.append(operatorType_name); - sb.append(" ("); - } - sb.append(this.operatorType); - if (operatorType_name != null) { - sb.append(")"); + if (this.operatorType == null) { + sb.append("null"); + } else { + sb.append(this.operatorType); } first = false; if (!first) sb.append(", "); @@ -636,10 +835,6 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetOperatorType() && !OperatorType.VALID_VALUES.contains(operatorType)){ - throw new TProtocolException("The field 'operatorType' has been assigned the invalid value " + operatorType); - } } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java index f175062..cd01b4d 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/OperatorType.java @@ -6,69 +6,87 @@ package org.apache.hadoop.hive.ql.plan.api; -import java.util.HashMap; import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum OperatorType implements TEnum { + JOIN(0), + MAPJOIN(1), + EXTRACT(2), + FILTER(3), + FORWARD(4), + GROUPBY(5), + LIMIT(6), + SCRIPT(7), + SELECT(8), + TABLESCAN(9), + FILESINK(10), + REDUCESINK(11), + UNION(12), + UDTF(13), + LATERALVIEWJOIN(14), + LATERALVIEWFORWARD(15), + HASHTABLESINK(16), + HASHTABLEDUMMY(17); -import org.apache.thrift.IntRangeSet; + private final int value; -public class OperatorType { - public static final int JOIN = 0; - public static final int MAPJOIN = 1; - public static final int EXTRACT = 2; - public static final int FILTER = 3; - public static final int FORWARD = 4; - public static final int GROUPBY = 5; - public static final int LIMIT = 6; - public static final int SCRIPT = 7; - public static final int SELECT = 8; - public static final int TABLESCAN = 9; - public static final int FILESINK = 10; - public static final int REDUCESINK = 11; - public static final int UNION = 12; - public static final int UDTF = 13; - public static final int LATERALVIEWJOIN = 14; - public static final int LATERALVIEWFORWARD = 15; - public static final int HASHTABLEDUMMY = 16; - public static final int HASHTABLESINK = 17; + private OperatorType(int value) { + this.value = value; + } - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - JOIN, - MAPJOIN, - EXTRACT, - FILTER, - FORWARD, - GROUPBY, - LIMIT, - SCRIPT, - SELECT, - TABLESCAN, - FILESINK, - REDUCESINK, - UNION, - UDTF, - LATERALVIEWJOIN, - LATERALVIEWFORWARD, - HASHTABLEDUMMY, - HASHTABLESINK); + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(JOIN, "JOIN"); - put(MAPJOIN, "MAPJOIN"); - put(EXTRACT, "EXTRACT"); - put(FILTER, "FILTER"); - put(FORWARD, "FORWARD"); - put(GROUPBY, "GROUPBY"); - put(LIMIT, "LIMIT"); - put(SCRIPT, "SCRIPT"); - put(SELECT, "SELECT"); - put(TABLESCAN, "TABLESCAN"); - put(FILESINK, "FILESINK"); - put(REDUCESINK, "REDUCESINK"); - put(UNION, "UNION"); - put(UDTF, "UDTF"); - put(LATERALVIEWJOIN, "LATERALVIEWJOIN"); - put(LATERALVIEWFORWARD, "LATERALVIEWFORWARD"); - put(HASHTABLEDUMMY, "HASHTABLEDUMMY"); - put(HASHTABLESINK, "HASHTABLESINK"); - }}; + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static OperatorType findByValue(int value) { + switch (value) { + case 0: + return JOIN; + case 1: + return MAPJOIN; + case 2: + return EXTRACT; + case 3: + return FILTER; + case 4: + return FORWARD; + case 5: + return GROUPBY; + case 6: + return LIMIT; + case 7: + return SCRIPT; + case 8: + return SELECT; + case 9: + return TABLESCAN; + case 10: + return FILESINK; + case 11: + return REDUCESINK; + case 12: + return UNION; + case 13: + return UDTF; + case 14: + return LATERALVIEWJOIN; + case 15: + return LATERALVIEWFORWARD; + case 16: + return HASHTABLESINK; + case 17: + return HASHTABLEDUMMY; + default: + return null; + } + } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java index 3ee94c3..32ce844 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Query.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Query implements TBase, java.io.Serializable, Cloneable { +public class Query implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Query"); + private static final TField QUERY_ID_FIELD_DESC = new TField("queryId", TType.STRING, (short)1); private static final TField QUERY_TYPE_FIELD_DESC = new TField("queryType", TType.STRING, (short)2); private static final TField QUERY_ATTRIBUTES_FIELD_DESC = new TField("queryAttributes", TType.MAP, (short)3); @@ -30,53 +39,123 @@ public class Query implements TBase, java.io.Serializable, Cloneable { private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8); private String queryId; - public static final int QUERYID = 1; private String queryType; - public static final int QUERYTYPE = 2; private Map queryAttributes; - public static final int QUERYATTRIBUTES = 3; private Map queryCounters; - public static final int QUERYCOUNTERS = 4; private Graph stageGraph; - public static final int STAGEGRAPH = 5; private List stageList; - public static final int STAGELIST = 6; private boolean done; - public static final int DONE = 7; private boolean started; - public static final int STARTED = 8; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean done = false; - public boolean started = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + QUERY_ID((short)1, "queryId"), + QUERY_TYPE((short)2, "queryType"), + QUERY_ATTRIBUTES((short)3, "queryAttributes"), + QUERY_COUNTERS((short)4, "queryCounters"), + STAGE_GRAPH((short)5, "stageGraph"), + STAGE_LIST((short)6, "stageList"), + DONE((short)7, "done"), + STARTED((short)8, "started"); + + 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: // QUERY_ID + return QUERY_ID; + case 2: // QUERY_TYPE + return QUERY_TYPE; + case 3: // QUERY_ATTRIBUTES + return QUERY_ATTRIBUTES; + case 4: // QUERY_COUNTERS + return QUERY_COUNTERS; + case 5: // STAGE_GRAPH + return STAGE_GRAPH; + case 6: // STAGE_LIST + return STAGE_LIST; + case 7: // DONE + return DONE; + case 8: // STARTED + return STARTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERYID, new FieldMetaData("queryId", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DONE_ISSET_ID = 0; + private static final int __STARTED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.QUERY_ID, new FieldMetaData("queryId", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(QUERYTYPE, new FieldMetaData("queryType", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.QUERY_TYPE, new FieldMetaData("queryType", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(QUERYATTRIBUTES, new FieldMetaData("queryAttributes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.QUERY_ATTRIBUTES, new FieldMetaData("queryAttributes", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(QUERYCOUNTERS, new FieldMetaData("queryCounters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.QUERY_COUNTERS, new FieldMetaData("queryCounters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.I64)))); - put(STAGEGRAPH, new FieldMetaData("stageGraph", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STAGE_GRAPH, new FieldMetaData("stageGraph", TFieldRequirementType.DEFAULT, new StructMetaData(TType.STRUCT, Graph.class))); - put(STAGELIST, new FieldMetaData("stageList", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STAGE_LIST, new FieldMetaData("stageList", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Stage.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Query.class, metaDataMap); } @@ -101,15 +180,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.stageGraph = stageGraph; this.stageList = stageList; this.done = done; - this.__isset.done = true; + setDoneIsSet(true); this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } /** * Performs a deep copy on other. */ public Query(Query other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetQueryId()) { this.queryId = other.queryId; } @@ -156,17 +237,28 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } this.stageList = __this__stageList; } - __isset.done = other.__isset.done; this.done = other.done; - __isset.started = other.__isset.started; this.started = other.started; } - @Override - public Query clone() { + public Query deepCopy() { return new Query(this); } + @Override + public void clear() { + this.queryId = null; + this.queryType = null; + this.queryAttributes = null; + this.queryCounters = null; + this.stageGraph = null; + this.stageList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + public String getQueryId() { return this.queryId; } @@ -179,11 +271,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.queryId = null; } - // Returns true if field queryId is set (has been asigned a value) and false otherwise + /** Returns true if field queryId is set (has been asigned a value) and false otherwise */ public boolean isSetQueryId() { return this.queryId != null; } + public void setQueryIdIsSet(boolean value) { + if (!value) { + this.queryId = null; + } + } + public String getQueryType() { return this.queryType; } @@ -196,11 +294,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.queryType = null; } - // Returns true if field queryType is set (has been asigned a value) and false otherwise + /** Returns true if field queryType is set (has been asigned a value) and false otherwise */ public boolean isSetQueryType() { return this.queryType != null; } + public void setQueryTypeIsSet(boolean value) { + if (!value) { + this.queryType = null; + } + } + public int getQueryAttributesSize() { return (this.queryAttributes == null) ? 0 : this.queryAttributes.size(); } @@ -224,11 +328,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.queryAttributes = null; } - // Returns true if field queryAttributes is set (has been asigned a value) and false otherwise + /** Returns true if field queryAttributes is set (has been asigned a value) and false otherwise */ public boolean isSetQueryAttributes() { return this.queryAttributes != null; } + public void setQueryAttributesIsSet(boolean value) { + if (!value) { + this.queryAttributes = null; + } + } + public int getQueryCountersSize() { return (this.queryCounters == null) ? 0 : this.queryCounters.size(); } @@ -252,11 +362,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.queryCounters = null; } - // Returns true if field queryCounters is set (has been asigned a value) and false otherwise + /** Returns true if field queryCounters is set (has been asigned a value) and false otherwise */ public boolean isSetQueryCounters() { return this.queryCounters != null; } + public void setQueryCountersIsSet(boolean value) { + if (!value) { + this.queryCounters = null; + } + } + public Graph getStageGraph() { return this.stageGraph; } @@ -269,11 +385,17 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.stageGraph = null; } - // Returns true if field stageGraph is set (has been asigned a value) and false otherwise + /** Returns true if field stageGraph is set (has been asigned a value) and false otherwise */ public boolean isSetStageGraph() { return this.stageGraph != null; } + public void setStageGraphIsSet(boolean value) { + if (!value) { + this.stageGraph = null; + } + } + public int getStageListSize() { return (this.stageList == null) ? 0 : this.stageList.size(); } @@ -301,27 +423,37 @@ public class Query implements TBase, java.io.Serializable, Cloneable { this.stageList = null; } - // Returns true if field stageList is set (has been asigned a value) and false otherwise + /** Returns true if field stageList is set (has been asigned a value) and false otherwise */ public boolean isSetStageList() { return this.stageList != null; } + public void setStageListIsSet(boolean value) { + if (!value) { + this.stageList = null; + } + } + public boolean isDone() { return this.done; } public void setDone(boolean done) { this.done = done; - this.__isset.done = true; + setDoneIsSet(true); } public void unsetDone() { - this.__isset.done = false; + __isset_bit_vector.clear(__DONE_ISSET_ID); } - // Returns true if field done is set (has been asigned a value) and false otherwise + /** Returns true if field done is set (has been asigned a value) and false otherwise */ public boolean isSetDone() { - return this.__isset.done; + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); } public boolean isStarted() { @@ -330,21 +462,25 @@ public class Query implements TBase, java.io.Serializable, Cloneable { public void setStarted(boolean started) { this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } public void unsetStarted() { - this.__isset.started = false; + __isset_bit_vector.clear(__STARTED_ISSET_ID); } - // Returns true if field started is set (has been asigned a value) and false otherwise + /** Returns true if field started is set (has been asigned a value) and false otherwise */ public boolean isSetStarted() { - return this.__isset.started; + return __isset_bit_vector.get(__STARTED_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case QUERYID: + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case QUERY_ID: if (value == null) { unsetQueryId(); } else { @@ -352,7 +488,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYTYPE: + case QUERY_TYPE: if (value == null) { unsetQueryType(); } else { @@ -360,7 +496,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYATTRIBUTES: + case QUERY_ATTRIBUTES: if (value == null) { unsetQueryAttributes(); } else { @@ -368,7 +504,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYCOUNTERS: + case QUERY_COUNTERS: if (value == null) { unsetQueryCounters(); } else { @@ -376,7 +512,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case STAGEGRAPH: + case STAGE_GRAPH: if (value == null) { unsetStageGraph(); } else { @@ -384,7 +520,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case STAGELIST: + case STAGE_LIST: if (value == null) { unsetStageList(); } else { @@ -408,29 +544,27 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case QUERYID: + public Object getFieldValue(_Fields field) { + switch (field) { + case QUERY_ID: return getQueryId(); - case QUERYTYPE: + case QUERY_TYPE: return getQueryType(); - case QUERYATTRIBUTES: + case QUERY_ATTRIBUTES: return getQueryAttributes(); - case QUERYCOUNTERS: + case QUERY_COUNTERS: return getQueryCounters(); - case STAGEGRAPH: + case STAGE_GRAPH: return getStageGraph(); - case STAGELIST: + case STAGE_LIST: return getStageList(); case DONE: @@ -439,33 +573,35 @@ public class Query implements TBase, java.io.Serializable, Cloneable { case STARTED: return new Boolean(isStarted()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case QUERYID: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case QUERY_ID: return isSetQueryId(); - case QUERYTYPE: + case QUERY_TYPE: return isSetQueryType(); - case QUERYATTRIBUTES: + case QUERY_ATTRIBUTES: return isSetQueryAttributes(); - case QUERYCOUNTERS: + case QUERY_COUNTERS: return isSetQueryCounters(); - case STAGEGRAPH: + case STAGE_GRAPH: return isSetStageGraph(); - case STAGELIST: + case STAGE_LIST: return isSetStageList(); case DONE: return isSetDone(); case STARTED: return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -561,6 +697,101 @@ public class Query implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Query other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Query typedOther = (Query)other; + + lastComparison = Boolean.valueOf(isSetQueryId()).compareTo(typedOther.isSetQueryId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryId()) { + lastComparison = TBaseHelper.compareTo(this.queryId, typedOther.queryId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryType()).compareTo(typedOther.isSetQueryType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryType()) { + lastComparison = TBaseHelper.compareTo(this.queryType, typedOther.queryType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryAttributes()).compareTo(typedOther.isSetQueryAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryAttributes()) { + lastComparison = TBaseHelper.compareTo(this.queryAttributes, typedOther.queryAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetQueryCounters()).compareTo(typedOther.isSetQueryCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueryCounters()) { + lastComparison = TBaseHelper.compareTo(this.queryCounters, typedOther.queryCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageGraph()).compareTo(typedOther.isSetStageGraph()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageGraph()) { + lastComparison = TBaseHelper.compareTo(this.stageGraph, typedOther.stageGraph); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageList()).compareTo(typedOther.isSetStageList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageList()) { + lastComparison = TBaseHelper.compareTo(this.stageList, typedOther.stageList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -570,23 +801,22 @@ public class Query implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case QUERYID: + switch (field.id) { + case 1: // QUERY_ID if (field.type == TType.STRING) { this.queryId = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case QUERYTYPE: + case 2: // QUERY_TYPE if (field.type == TType.STRING) { this.queryType = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case QUERYATTRIBUTES: + case 3: // QUERY_ATTRIBUTES if (field.type == TType.MAP) { { TMap _map50 = iprot.readMapBegin(); @@ -605,7 +835,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case QUERYCOUNTERS: + case 4: // QUERY_COUNTERS if (field.type == TType.MAP) { { TMap _map54 = iprot.readMapBegin(); @@ -624,7 +854,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case STAGEGRAPH: + case 5: // STAGE_GRAPH if (field.type == TType.STRUCT) { this.stageGraph = new Graph(); this.stageGraph.read(iprot); @@ -632,7 +862,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case STAGELIST: + case 6: // STAGE_LIST if (field.type == TType.LIST) { { TList _list58 = iprot.readListBegin(); @@ -650,30 +880,28 @@ public class Query implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DONE: + case 7: // DONE if (field.type == TType.BOOL) { this.done = iprot.readBool(); - this.__isset.done = true; + setDoneIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STARTED: + case 8: // STARTED if (field.type == TType.BOOL) { this.started = iprot.readBool(); - this.__isset.started = true; + setStartedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -695,7 +923,8 @@ public class Query implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(QUERY_ATTRIBUTES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.queryAttributes.size())); - for (Map.Entry _iter61 : this.queryAttributes.entrySet()) { + for (Map.Entry _iter61 : this.queryAttributes.entrySet()) + { oprot.writeString(_iter61.getKey()); oprot.writeString(_iter61.getValue()); } @@ -707,7 +936,8 @@ public class Query implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(QUERY_COUNTERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.queryCounters.size())); - for (Map.Entry _iter62 : this.queryCounters.entrySet()) { + for (Map.Entry _iter62 : this.queryCounters.entrySet()) + { oprot.writeString(_iter62.getKey()); oprot.writeI64(_iter62.getValue()); } @@ -724,7 +954,8 @@ public class Query implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(STAGE_LIST_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.stageList.size())); - for (Stage _iter63 : this.stageList) { + for (Stage _iter63 : this.stageList) + { _iter63.write(oprot); } oprot.writeListEnd(); @@ -807,7 +1038,6 @@ public class Query implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java index 7ed9c4c..ea18040 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/QueryPlan.java @@ -9,45 +9,114 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class QueryPlan implements TBase, java.io.Serializable, Cloneable { +public class QueryPlan implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("QueryPlan"); + private static final TField QUERIES_FIELD_DESC = new TField("queries", TType.LIST, (short)1); private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)2); private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)3); private List queries; - public static final int QUERIES = 1; private boolean done; - public static final int DONE = 2; private boolean started; - public static final int STARTED = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean done = false; - public boolean started = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + QUERIES((short)1, "queries"), + DONE((short)2, "done"), + STARTED((short)3, "started"); + + 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: // QUERIES + return QUERIES; + case 2: // DONE + return DONE; + case 3: // STARTED + return STARTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERIES, new FieldMetaData("queries", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DONE_ISSET_ID = 0; + private static final int __STARTED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.QUERIES, new FieldMetaData("queries", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Query.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(QueryPlan.class, metaDataMap); } @@ -62,15 +131,17 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { this(); this.queries = queries; this.done = done; - this.__isset.done = true; + setDoneIsSet(true); this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } /** * Performs a deep copy on other. */ public QueryPlan(QueryPlan other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetQueries()) { List __this__queries = new ArrayList(); for (Query other_element : other.queries) { @@ -78,17 +149,23 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { } this.queries = __this__queries; } - __isset.done = other.__isset.done; this.done = other.done; - __isset.started = other.__isset.started; this.started = other.started; } - @Override - public QueryPlan clone() { + public QueryPlan deepCopy() { return new QueryPlan(this); } + @Override + public void clear() { + this.queries = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + public int getQueriesSize() { return (this.queries == null) ? 0 : this.queries.size(); } @@ -116,27 +193,37 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { this.queries = null; } - // Returns true if field queries is set (has been asigned a value) and false otherwise + /** Returns true if field queries is set (has been asigned a value) and false otherwise */ public boolean isSetQueries() { return this.queries != null; } + public void setQueriesIsSet(boolean value) { + if (!value) { + this.queries = null; + } + } + public boolean isDone() { return this.done; } public void setDone(boolean done) { this.done = done; - this.__isset.done = true; + setDoneIsSet(true); } public void unsetDone() { - this.__isset.done = false; + __isset_bit_vector.clear(__DONE_ISSET_ID); } - // Returns true if field done is set (has been asigned a value) and false otherwise + /** Returns true if field done is set (has been asigned a value) and false otherwise */ public boolean isSetDone() { - return this.__isset.done; + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); } public boolean isStarted() { @@ -145,20 +232,24 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { public void setStarted(boolean started) { this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } public void unsetStarted() { - this.__isset.started = false; + __isset_bit_vector.clear(__STARTED_ISSET_ID); } - // Returns true if field started is set (has been asigned a value) and false otherwise + /** Returns true if field started is set (has been asigned a value) and false otherwise */ public boolean isSetStarted() { - return this.__isset.started; + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case QUERIES: if (value == null) { unsetQueries(); @@ -183,13 +274,11 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case QUERIES: return getQueries(); @@ -199,23 +288,25 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { case STARTED: return new Boolean(isStarted()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case QUERIES: return isSetQueries(); case DONE: return isSetDone(); case STARTED: return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -266,6 +357,51 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(QueryPlan other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + QueryPlan typedOther = (QueryPlan)other; + + lastComparison = Boolean.valueOf(isSetQueries()).compareTo(typedOther.isSetQueries()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQueries()) { + lastComparison = TBaseHelper.compareTo(this.queries, typedOther.queries); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -275,9 +411,8 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case QUERIES: + switch (field.id) { + case 1: // QUERIES if (field.type == TType.LIST) { { TList _list64 = iprot.readListBegin(); @@ -295,30 +430,28 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DONE: + case 2: // DONE if (field.type == TType.BOOL) { this.done = iprot.readBool(); - this.__isset.done = true; + setDoneIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STARTED: + case 3: // STARTED if (field.type == TType.BOOL) { this.started = iprot.readBool(); - this.__isset.started = true; + setStartedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -330,7 +463,8 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(QUERIES_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.queries.size())); - for (Query _iter67 : this.queries) { + for (Query _iter67 : this.queries) + { _iter67.write(oprot); } oprot.writeListEnd(); @@ -373,7 +507,6 @@ public class QueryPlan implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java index 7d2bf61..4a852bd 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Stage.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Stage implements TBase, java.io.Serializable, Cloneable { +public class Stage implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Stage"); + private static final TField STAGE_ID_FIELD_DESC = new TField("stageId", TType.STRING, (short)1); private static final TField STAGE_TYPE_FIELD_DESC = new TField("stageType", TType.I32, (short)2); private static final TField STAGE_ATTRIBUTES_FIELD_DESC = new TField("stageAttributes", TType.MAP, (short)3); @@ -29,50 +38,121 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)7); private String stageId; - public static final int STAGEID = 1; - private int stageType; - public static final int STAGETYPE = 2; + private StageType stageType; private Map stageAttributes; - public static final int STAGEATTRIBUTES = 3; private Map stageCounters; - public static final int STAGECOUNTERS = 4; private List taskList; - public static final int TASKLIST = 5; private boolean done; - public static final int DONE = 6; private boolean started; - public static final int STARTED = 7; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean stageType = false; - public boolean done = false; - public boolean started = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + STAGE_ID((short)1, "stageId"), + /** + * + * @see StageType + */ + STAGE_TYPE((short)2, "stageType"), + STAGE_ATTRIBUTES((short)3, "stageAttributes"), + STAGE_COUNTERS((short)4, "stageCounters"), + TASK_LIST((short)5, "taskList"), + DONE((short)6, "done"), + STARTED((short)7, "started"); + + 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: // STAGE_ID + return STAGE_ID; + case 2: // STAGE_TYPE + return STAGE_TYPE; + case 3: // STAGE_ATTRIBUTES + return STAGE_ATTRIBUTES; + case 4: // STAGE_COUNTERS + return STAGE_COUNTERS; + case 5: // TASK_LIST + return TASK_LIST; + case 6: // DONE + return DONE; + case 7: // STARTED + return STARTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(STAGEID, new FieldMetaData("stageId", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DONE_ISSET_ID = 0; + private static final int __STARTED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.STAGE_ID, new FieldMetaData("stageId", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(STAGETYPE, new FieldMetaData("stageType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(STAGEATTRIBUTES, new FieldMetaData("stageAttributes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STAGE_TYPE, new FieldMetaData("stageType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, StageType.class))); + tmpMap.put(_Fields.STAGE_ATTRIBUTES, new FieldMetaData("stageAttributes", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(STAGECOUNTERS, new FieldMetaData("stageCounters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STAGE_COUNTERS, new FieldMetaData("stageCounters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.I64)))); - put(TASKLIST, new FieldMetaData("taskList", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TASK_LIST, new FieldMetaData("taskList", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Task.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Stage.class, metaDataMap); } @@ -81,7 +161,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { public Stage( String stageId, - int stageType, + StageType stageType, Map stageAttributes, Map stageCounters, List taskList, @@ -91,25 +171,27 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { this(); this.stageId = stageId; this.stageType = stageType; - this.__isset.stageType = true; this.stageAttributes = stageAttributes; this.stageCounters = stageCounters; this.taskList = taskList; this.done = done; - this.__isset.done = true; + setDoneIsSet(true); this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } /** * Performs a deep copy on other. */ public Stage(Stage other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetStageId()) { this.stageId = other.stageId; } - __isset.stageType = other.__isset.stageType; - this.stageType = other.stageType; + if (other.isSetStageType()) { + this.stageType = other.stageType; + } if (other.isSetStageAttributes()) { Map __this__stageAttributes = new HashMap(); for (Map.Entry other_element : other.stageAttributes.entrySet()) { @@ -147,17 +229,27 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } this.taskList = __this__taskList; } - __isset.done = other.__isset.done; this.done = other.done; - __isset.started = other.__isset.started; this.started = other.started; } - @Override - public Stage clone() { + public Stage deepCopy() { return new Stage(this); } + @Override + public void clear() { + this.stageId = null; + this.stageType = null; + this.stageAttributes = null; + this.stageCounters = null; + this.taskList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + public String getStageId() { return this.stageId; } @@ -170,27 +262,46 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { this.stageId = null; } - // Returns true if field stageId is set (has been asigned a value) and false otherwise + /** Returns true if field stageId is set (has been asigned a value) and false otherwise */ public boolean isSetStageId() { return this.stageId != null; } - public int getStageType() { + public void setStageIdIsSet(boolean value) { + if (!value) { + this.stageId = null; + } + } + + /** + * + * @see StageType + */ + public StageType getStageType() { return this.stageType; } - public void setStageType(int stageType) { + /** + * + * @see StageType + */ + public void setStageType(StageType stageType) { this.stageType = stageType; - this.__isset.stageType = true; } public void unsetStageType() { - this.__isset.stageType = false; + this.stageType = null; } - // Returns true if field stageType is set (has been asigned a value) and false otherwise + /** Returns true if field stageType is set (has been asigned a value) and false otherwise */ public boolean isSetStageType() { - return this.__isset.stageType; + return this.stageType != null; + } + + public void setStageTypeIsSet(boolean value) { + if (!value) { + this.stageType = null; + } } public int getStageAttributesSize() { @@ -216,11 +327,17 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { this.stageAttributes = null; } - // Returns true if field stageAttributes is set (has been asigned a value) and false otherwise + /** Returns true if field stageAttributes is set (has been asigned a value) and false otherwise */ public boolean isSetStageAttributes() { return this.stageAttributes != null; } + public void setStageAttributesIsSet(boolean value) { + if (!value) { + this.stageAttributes = null; + } + } + public int getStageCountersSize() { return (this.stageCounters == null) ? 0 : this.stageCounters.size(); } @@ -244,11 +361,17 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { this.stageCounters = null; } - // Returns true if field stageCounters is set (has been asigned a value) and false otherwise + /** Returns true if field stageCounters is set (has been asigned a value) and false otherwise */ public boolean isSetStageCounters() { return this.stageCounters != null; } + public void setStageCountersIsSet(boolean value) { + if (!value) { + this.stageCounters = null; + } + } + public int getTaskListSize() { return (this.taskList == null) ? 0 : this.taskList.size(); } @@ -276,27 +399,37 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { this.taskList = null; } - // Returns true if field taskList is set (has been asigned a value) and false otherwise + /** Returns true if field taskList is set (has been asigned a value) and false otherwise */ public boolean isSetTaskList() { return this.taskList != null; } + public void setTaskListIsSet(boolean value) { + if (!value) { + this.taskList = null; + } + } + public boolean isDone() { return this.done; } public void setDone(boolean done) { this.done = done; - this.__isset.done = true; + setDoneIsSet(true); } public void unsetDone() { - this.__isset.done = false; + __isset_bit_vector.clear(__DONE_ISSET_ID); } - // Returns true if field done is set (has been asigned a value) and false otherwise + /** Returns true if field done is set (has been asigned a value) and false otherwise */ public boolean isSetDone() { - return this.__isset.done; + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); } public boolean isStarted() { @@ -305,21 +438,25 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { public void setStarted(boolean started) { this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } public void unsetStarted() { - this.__isset.started = false; + __isset_bit_vector.clear(__STARTED_ISSET_ID); } - // Returns true if field started is set (has been asigned a value) and false otherwise + /** Returns true if field started is set (has been asigned a value) and false otherwise */ public boolean isSetStarted() { - return this.__isset.started; + return __isset_bit_vector.get(__STARTED_ISSET_ID); + } + + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case STAGEID: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STAGE_ID: if (value == null) { unsetStageId(); } else { @@ -327,15 +464,15 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - case STAGETYPE: + case STAGE_TYPE: if (value == null) { unsetStageType(); } else { - setStageType((Integer)value); + setStageType((StageType)value); } break; - case STAGEATTRIBUTES: + case STAGE_ATTRIBUTES: if (value == null) { unsetStageAttributes(); } else { @@ -343,7 +480,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - case STAGECOUNTERS: + case STAGE_COUNTERS: if (value == null) { unsetStageCounters(); } else { @@ -351,7 +488,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - case TASKLIST: + case TASK_LIST: if (value == null) { unsetTaskList(); } else { @@ -375,26 +512,24 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case STAGEID: + public Object getFieldValue(_Fields field) { + switch (field) { + case STAGE_ID: return getStageId(); - case STAGETYPE: + case STAGE_TYPE: return getStageType(); - case STAGEATTRIBUTES: + case STAGE_ATTRIBUTES: return getStageAttributes(); - case STAGECOUNTERS: + case STAGE_COUNTERS: return getStageCounters(); - case TASKLIST: + case TASK_LIST: return getTaskList(); case DONE: @@ -403,31 +538,33 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { case STARTED: return new Boolean(isStarted()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case STAGEID: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case STAGE_ID: return isSetStageId(); - case STAGETYPE: + case STAGE_TYPE: return isSetStageType(); - case STAGEATTRIBUTES: + case STAGE_ATTRIBUTES: return isSetStageAttributes(); - case STAGECOUNTERS: + case STAGE_COUNTERS: return isSetStageCounters(); - case TASKLIST: + case TASK_LIST: return isSetTaskList(); case DONE: return isSetDone(); case STARTED: return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -452,12 +589,12 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { return false; } - boolean this_present_stageType = true; - boolean that_present_stageType = true; + boolean this_present_stageType = true && this.isSetStageType(); + boolean that_present_stageType = true && that.isSetStageType(); if (this_present_stageType || that_present_stageType) { if (!(this_present_stageType && that_present_stageType)) return false; - if (this.stageType != that.stageType) + if (!this.stageType.equals(that.stageType)) return false; } @@ -514,6 +651,91 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Stage other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Stage typedOther = (Stage)other; + + lastComparison = Boolean.valueOf(isSetStageId()).compareTo(typedOther.isSetStageId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageId()) { + lastComparison = TBaseHelper.compareTo(this.stageId, typedOther.stageId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageType()).compareTo(typedOther.isSetStageType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageType()) { + lastComparison = TBaseHelper.compareTo(this.stageType, typedOther.stageType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageAttributes()).compareTo(typedOther.isSetStageAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageAttributes()) { + lastComparison = TBaseHelper.compareTo(this.stageAttributes, typedOther.stageAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStageCounters()).compareTo(typedOther.isSetStageCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStageCounters()) { + lastComparison = TBaseHelper.compareTo(this.stageCounters, typedOther.stageCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskList()).compareTo(typedOther.isSetTaskList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskList()) { + lastComparison = TBaseHelper.compareTo(this.taskList, typedOther.taskList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -523,24 +745,22 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case STAGEID: + switch (field.id) { + case 1: // STAGE_ID if (field.type == TType.STRING) { this.stageId = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STAGETYPE: + case 2: // STAGE_TYPE if (field.type == TType.I32) { - this.stageType = iprot.readI32(); - this.__isset.stageType = true; + this.stageType = StageType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STAGEATTRIBUTES: + case 3: // STAGE_ATTRIBUTES if (field.type == TType.MAP) { { TMap _map36 = iprot.readMapBegin(); @@ -559,7 +779,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case STAGECOUNTERS: + case 4: // STAGE_COUNTERS if (field.type == TType.MAP) { { TMap _map40 = iprot.readMapBegin(); @@ -578,7 +798,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case TASKLIST: + case 5: // TASK_LIST if (field.type == TType.LIST) { { TList _list44 = iprot.readListBegin(); @@ -596,30 +816,28 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DONE: + case 6: // DONE if (field.type == TType.BOOL) { this.done = iprot.readBool(); - this.__isset.done = true; + setDoneIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STARTED: + case 7: // STARTED if (field.type == TType.BOOL) { this.started = iprot.readBool(); - this.__isset.started = true; + setStartedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -632,14 +850,17 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { oprot.writeString(this.stageId); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); - oprot.writeI32(this.stageType); - oprot.writeFieldEnd(); + if (this.stageType != null) { + oprot.writeFieldBegin(STAGE_TYPE_FIELD_DESC); + oprot.writeI32(this.stageType.getValue()); + oprot.writeFieldEnd(); + } if (this.stageAttributes != null) { oprot.writeFieldBegin(STAGE_ATTRIBUTES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.stageAttributes.size())); - for (Map.Entry _iter47 : this.stageAttributes.entrySet()) { + for (Map.Entry _iter47 : this.stageAttributes.entrySet()) + { oprot.writeString(_iter47.getKey()); oprot.writeString(_iter47.getValue()); } @@ -651,7 +872,8 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(STAGE_COUNTERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.stageCounters.size())); - for (Map.Entry _iter48 : this.stageCounters.entrySet()) { + for (Map.Entry _iter48 : this.stageCounters.entrySet()) + { oprot.writeString(_iter48.getKey()); oprot.writeI64(_iter48.getValue()); } @@ -663,7 +885,8 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(TASK_LIST_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.taskList.size())); - for (Task _iter49 : this.taskList) { + for (Task _iter49 : this.taskList) + { _iter49.write(oprot); } oprot.writeListEnd(); @@ -694,14 +917,10 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { first = false; if (!first) sb.append(", "); sb.append("stageType:"); - String stageType_name = StageType.VALUES_TO_NAMES.get(this.stageType); - if (stageType_name != null) { - sb.append(stageType_name); - sb.append(" ("); - } - sb.append(this.stageType); - if (stageType_name != null) { - sb.append(")"); + if (this.stageType == null) { + sb.append("null"); + } else { + sb.append(this.stageType); } first = false; if (!first) sb.append(", "); @@ -742,10 +961,6 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetStageType() && !StageType.VALID_VALUES.contains(stageType)){ - throw new TProtocolException("The field 'stageType' has been assigned the invalid value " + stageType); - } } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java index 7950551..305f9af 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/StageType.java @@ -6,45 +6,63 @@ package org.apache.hadoop.hive.ql.plan.api; -import java.util.HashMap; import java.util.Map; +import java.util.HashMap; +import org.apache.thrift.TEnum; + +public enum StageType implements TEnum { + CONDITIONAL(0), + COPY(1), + DDL(2), + MAPRED(3), + EXPLAIN(4), + FETCH(5), + FUNC(6), + MAPREDLOCAL(7), + MOVE(8), + STATS(9); -import org.apache.thrift.IntRangeSet; + private final int value; -public class StageType { - public static final int CONDITIONAL = 0; - public static final int COPY = 1; - public static final int DDL = 2; - public static final int MAPRED = 3; - public static final int EXPLAIN = 4; - public static final int FETCH = 5; - public static final int FUNC = 6; - public static final int MAPREDLOCAL = 7; - public static final int MOVE = 8; - public static final int STATS = 9; + private StageType(int value) { + this.value = value; + } - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - CONDITIONAL, - COPY, - DDL, - MAPRED, - EXPLAIN, - FETCH, - FUNC, - MAPREDLOCAL, - MOVE, - STATS); + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(CONDITIONAL, "CONDITIONAL"); - put(COPY, "COPY"); - put(DDL, "DDL"); - put(MAPRED, "MAPRED"); - put(EXPLAIN, "EXPLAIN"); - put(FETCH, "FETCH"); - put(FUNC, "FUNC"); - put(MAPREDLOCAL, "MAPREDLOCAL"); - put(MOVE, "MOVE"); - put(STATS, "STATS"); - }}; + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static StageType findByValue(int value) { + switch (value) { + case 0: + return CONDITIONAL; + case 1: + return COPY; + case 2: + return DDL; + case 3: + return MAPRED; + case 4: + return EXPLAIN; + case 5: + return FETCH; + case 6: + return FUNC; + case 7: + return MAPREDLOCAL; + case 8: + return MOVE; + case 9: + return STATS; + default: + return null; + } + } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java index 3e6c79c..ddad2a8 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class Task implements TBase, java.io.Serializable, Cloneable { +public class Task implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("Task"); + private static final TField TASK_ID_FIELD_DESC = new TField("taskId", TType.STRING, (short)1); private static final TField TASK_TYPE_FIELD_DESC = new TField("taskType", TType.I32, (short)2); private static final TField TASK_ATTRIBUTES_FIELD_DESC = new TField("taskAttributes", TType.MAP, (short)3); @@ -30,54 +39,127 @@ public class Task implements TBase, java.io.Serializable, Cloneable { private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8); private String taskId; - public static final int TASKID = 1; - private int taskType; - public static final int TASKTYPE = 2; + private TaskType taskType; private Map taskAttributes; - public static final int TASKATTRIBUTES = 3; private Map taskCounters; - public static final int TASKCOUNTERS = 4; private Graph operatorGraph; - public static final int OPERATORGRAPH = 5; private List operatorList; - public static final int OPERATORLIST = 6; private boolean done; - public static final int DONE = 7; private boolean started; - public static final int STARTED = 8; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean taskType = false; - public boolean done = false; - public boolean started = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TASK_ID((short)1, "taskId"), + /** + * + * @see TaskType + */ + TASK_TYPE((short)2, "taskType"), + TASK_ATTRIBUTES((short)3, "taskAttributes"), + TASK_COUNTERS((short)4, "taskCounters"), + OPERATOR_GRAPH((short)5, "operatorGraph"), + OPERATOR_LIST((short)6, "operatorList"), + DONE((short)7, "done"), + STARTED((short)8, "started"); + + 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: // TASK_ID + return TASK_ID; + case 2: // TASK_TYPE + return TASK_TYPE; + case 3: // TASK_ATTRIBUTES + return TASK_ATTRIBUTES; + case 4: // TASK_COUNTERS + return TASK_COUNTERS; + case 5: // OPERATOR_GRAPH + return OPERATOR_GRAPH; + case 6: // OPERATOR_LIST + return OPERATOR_LIST; + case 7: // DONE + return DONE; + case 8: // STARTED + return STARTED; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TASKID, new FieldMetaData("taskId", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __DONE_ISSET_ID = 0; + private static final int __STARTED_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TASK_ID, new FieldMetaData("taskId", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(TASKTYPE, new FieldMetaData("taskType", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(TASKATTRIBUTES, new FieldMetaData("taskAttributes", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TASK_TYPE, new FieldMetaData("taskType", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, TaskType.class))); + tmpMap.put(_Fields.TASK_ATTRIBUTES, new FieldMetaData("taskAttributes", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - put(TASKCOUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.TASK_COUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.I64)))); - put(OPERATORGRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.OPERATOR_GRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, new StructMetaData(TType.STRUCT, Graph.class))); - put(OPERATORLIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, + tmpMap.put(_Fields.OPERATOR_LIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, Operator.class)))); - put(DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - put(STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.BOOL))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap); } @@ -86,37 +168,35 @@ public class Task implements TBase, java.io.Serializable, Cloneable { public Task( String taskId, - int taskType, + TaskType taskType, Map taskAttributes, Map taskCounters, - Graph operatorGraph, - List operatorList, boolean done, boolean started) { this(); this.taskId = taskId; this.taskType = taskType; - this.__isset.taskType = true; this.taskAttributes = taskAttributes; this.taskCounters = taskCounters; - this.operatorGraph = operatorGraph; - this.operatorList = operatorList; this.done = done; - this.__isset.done = true; + setDoneIsSet(true); this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } /** * Performs a deep copy on other. */ public Task(Task other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetTaskId()) { this.taskId = other.taskId; } - __isset.taskType = other.__isset.taskType; - this.taskType = other.taskType; + if (other.isSetTaskType()) { + this.taskType = other.taskType; + } if (other.isSetTaskAttributes()) { Map __this__taskAttributes = new HashMap(); for (Map.Entry other_element : other.taskAttributes.entrySet()) { @@ -157,17 +237,28 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } this.operatorList = __this__operatorList; } - __isset.done = other.__isset.done; this.done = other.done; - __isset.started = other.__isset.started; this.started = other.started; } - @Override - public Task clone() { + public Task deepCopy() { return new Task(this); } + @Override + public void clear() { + this.taskId = null; + this.taskType = null; + this.taskAttributes = null; + this.taskCounters = null; + this.operatorGraph = null; + this.operatorList = null; + setDoneIsSet(false); + this.done = false; + setStartedIsSet(false); + this.started = false; + } + public String getTaskId() { return this.taskId; } @@ -180,27 +271,46 @@ public class Task implements TBase, java.io.Serializable, Cloneable { this.taskId = null; } - // Returns true if field taskId is set (has been asigned a value) and false otherwise + /** Returns true if field taskId is set (has been asigned a value) and false otherwise */ public boolean isSetTaskId() { return this.taskId != null; } - public int getTaskType() { + public void setTaskIdIsSet(boolean value) { + if (!value) { + this.taskId = null; + } + } + + /** + * + * @see TaskType + */ + public TaskType getTaskType() { return this.taskType; } - public void setTaskType(int taskType) { + /** + * + * @see TaskType + */ + public void setTaskType(TaskType taskType) { this.taskType = taskType; - this.__isset.taskType = true; } public void unsetTaskType() { - this.__isset.taskType = false; + this.taskType = null; } - // Returns true if field taskType is set (has been asigned a value) and false otherwise + /** Returns true if field taskType is set (has been asigned a value) and false otherwise */ public boolean isSetTaskType() { - return this.__isset.taskType; + return this.taskType != null; + } + + public void setTaskTypeIsSet(boolean value) { + if (!value) { + this.taskType = null; + } } public int getTaskAttributesSize() { @@ -226,11 +336,17 @@ public class Task implements TBase, java.io.Serializable, Cloneable { this.taskAttributes = null; } - // Returns true if field taskAttributes is set (has been asigned a value) and false otherwise + /** Returns true if field taskAttributes is set (has been asigned a value) and false otherwise */ public boolean isSetTaskAttributes() { return this.taskAttributes != null; } + public void setTaskAttributesIsSet(boolean value) { + if (!value) { + this.taskAttributes = null; + } + } + public int getTaskCountersSize() { return (this.taskCounters == null) ? 0 : this.taskCounters.size(); } @@ -254,11 +370,17 @@ public class Task implements TBase, java.io.Serializable, Cloneable { this.taskCounters = null; } - // Returns true if field taskCounters is set (has been asigned a value) and false otherwise + /** Returns true if field taskCounters is set (has been asigned a value) and false otherwise */ public boolean isSetTaskCounters() { return this.taskCounters != null; } + public void setTaskCountersIsSet(boolean value) { + if (!value) { + this.taskCounters = null; + } + } + public Graph getOperatorGraph() { return this.operatorGraph; } @@ -271,11 +393,17 @@ public class Task implements TBase, java.io.Serializable, Cloneable { this.operatorGraph = null; } - // Returns true if field operatorGraph is set (has been asigned a value) and false otherwise + /** Returns true if field operatorGraph is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorGraph() { return this.operatorGraph != null; } + public void setOperatorGraphIsSet(boolean value) { + if (!value) { + this.operatorGraph = null; + } + } + public int getOperatorListSize() { return (this.operatorList == null) ? 0 : this.operatorList.size(); } @@ -303,27 +431,37 @@ public class Task implements TBase, java.io.Serializable, Cloneable { this.operatorList = null; } - // Returns true if field operatorList is set (has been asigned a value) and false otherwise + /** Returns true if field operatorList is set (has been asigned a value) and false otherwise */ public boolean isSetOperatorList() { return this.operatorList != null; } + public void setOperatorListIsSet(boolean value) { + if (!value) { + this.operatorList = null; + } + } + public boolean isDone() { return this.done; } public void setDone(boolean done) { this.done = done; - this.__isset.done = true; + setDoneIsSet(true); } public void unsetDone() { - this.__isset.done = false; + __isset_bit_vector.clear(__DONE_ISSET_ID); } - // Returns true if field done is set (has been asigned a value) and false otherwise + /** Returns true if field done is set (has been asigned a value) and false otherwise */ public boolean isSetDone() { - return this.__isset.done; + return __isset_bit_vector.get(__DONE_ISSET_ID); + } + + public void setDoneIsSet(boolean value) { + __isset_bit_vector.set(__DONE_ISSET_ID, value); } public boolean isStarted() { @@ -332,21 +470,25 @@ public class Task implements TBase, java.io.Serializable, Cloneable { public void setStarted(boolean started) { this.started = started; - this.__isset.started = true; + setStartedIsSet(true); } public void unsetStarted() { - this.__isset.started = false; + __isset_bit_vector.clear(__STARTED_ISSET_ID); } - // Returns true if field started is set (has been asigned a value) and false otherwise + /** Returns true if field started is set (has been asigned a value) and false otherwise */ public boolean isSetStarted() { - return this.__isset.started; + return __isset_bit_vector.get(__STARTED_ISSET_ID); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TASKID: + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TASK_ID: if (value == null) { unsetTaskId(); } else { @@ -354,15 +496,15 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case TASKTYPE: + case TASK_TYPE: if (value == null) { unsetTaskType(); } else { - setTaskType((Integer)value); + setTaskType((TaskType)value); } break; - case TASKATTRIBUTES: + case TASK_ATTRIBUTES: if (value == null) { unsetTaskAttributes(); } else { @@ -370,7 +512,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case TASKCOUNTERS: + case TASK_COUNTERS: if (value == null) { unsetTaskCounters(); } else { @@ -378,7 +520,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORGRAPH: + case OPERATOR_GRAPH: if (value == null) { unsetOperatorGraph(); } else { @@ -386,7 +528,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORLIST: + case OPERATOR_LIST: if (value == null) { unsetOperatorList(); } else { @@ -410,29 +552,27 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TASKID: + public Object getFieldValue(_Fields field) { + switch (field) { + case TASK_ID: return getTaskId(); - case TASKTYPE: + case TASK_TYPE: return getTaskType(); - case TASKATTRIBUTES: + case TASK_ATTRIBUTES: return getTaskAttributes(); - case TASKCOUNTERS: + case TASK_COUNTERS: return getTaskCounters(); - case OPERATORGRAPH: + case OPERATOR_GRAPH: return getOperatorGraph(); - case OPERATORLIST: + case OPERATOR_LIST: return getOperatorList(); case DONE: @@ -441,33 +581,35 @@ public class Task implements TBase, java.io.Serializable, Cloneable { case STARTED: return new Boolean(isStarted()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TASKID: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TASK_ID: return isSetTaskId(); - case TASKTYPE: + case TASK_TYPE: return isSetTaskType(); - case TASKATTRIBUTES: + case TASK_ATTRIBUTES: return isSetTaskAttributes(); - case TASKCOUNTERS: + case TASK_COUNTERS: return isSetTaskCounters(); - case OPERATORGRAPH: + case OPERATOR_GRAPH: return isSetOperatorGraph(); - case OPERATORLIST: + case OPERATOR_LIST: return isSetOperatorList(); case DONE: return isSetDone(); case STARTED: return isSetStarted(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -492,12 +634,12 @@ public class Task implements TBase, java.io.Serializable, Cloneable { return false; } - boolean this_present_taskType = true; - boolean that_present_taskType = true; + boolean this_present_taskType = true && this.isSetTaskType(); + boolean that_present_taskType = true && that.isSetTaskType(); if (this_present_taskType || that_present_taskType) { if (!(this_present_taskType && that_present_taskType)) return false; - if (this.taskType != that.taskType) + if (!this.taskType.equals(that.taskType)) return false; } @@ -563,6 +705,101 @@ public class Task implements TBase, java.io.Serializable, Cloneable { return 0; } + public int compareTo(Task other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Task typedOther = (Task)other; + + lastComparison = Boolean.valueOf(isSetTaskId()).compareTo(typedOther.isSetTaskId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskId()) { + lastComparison = TBaseHelper.compareTo(this.taskId, typedOther.taskId); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskType()).compareTo(typedOther.isSetTaskType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskType()) { + lastComparison = TBaseHelper.compareTo(this.taskType, typedOther.taskType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskAttributes()).compareTo(typedOther.isSetTaskAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskAttributes()) { + lastComparison = TBaseHelper.compareTo(this.taskAttributes, typedOther.taskAttributes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTaskCounters()).compareTo(typedOther.isSetTaskCounters()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskCounters()) { + lastComparison = TBaseHelper.compareTo(this.taskCounters, typedOther.taskCounters); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorGraph()).compareTo(typedOther.isSetOperatorGraph()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorGraph()) { + lastComparison = TBaseHelper.compareTo(this.operatorGraph, typedOther.operatorGraph); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetOperatorList()).compareTo(typedOther.isSetOperatorList()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetOperatorList()) { + lastComparison = TBaseHelper.compareTo(this.operatorList, typedOther.operatorList); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetDone()).compareTo(typedOther.isSetDone()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetDone()) { + lastComparison = TBaseHelper.compareTo(this.done, typedOther.done); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStarted()).compareTo(typedOther.isSetStarted()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStarted()) { + lastComparison = TBaseHelper.compareTo(this.started, typedOther.started); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -572,24 +809,22 @@ public class Task implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TASKID: + switch (field.id) { + case 1: // TASK_ID if (field.type == TType.STRING) { this.taskId = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TASKTYPE: + case 2: // TASK_TYPE if (field.type == TType.I32) { - this.taskType = iprot.readI32(); - this.__isset.taskType = true; + this.taskType = TaskType.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; - case TASKATTRIBUTES: + case 3: // TASK_ATTRIBUTES if (field.type == TType.MAP) { { TMap _map22 = iprot.readMapBegin(); @@ -608,7 +843,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case TASKCOUNTERS: + case 4: // TASK_COUNTERS if (field.type == TType.MAP) { { TMap _map26 = iprot.readMapBegin(); @@ -627,7 +862,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case OPERATORGRAPH: + case 5: // OPERATOR_GRAPH if (field.type == TType.STRUCT) { this.operatorGraph = new Graph(); this.operatorGraph.read(iprot); @@ -635,7 +870,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case OPERATORLIST: + case 6: // OPERATOR_LIST if (field.type == TType.LIST) { { TList _list30 = iprot.readListBegin(); @@ -653,30 +888,28 @@ public class Task implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case DONE: + case 7: // DONE if (field.type == TType.BOOL) { this.done = iprot.readBool(); - this.__isset.done = true; + setDoneIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STARTED: + case 8: // STARTED if (field.type == TType.BOOL) { this.started = iprot.readBool(); - this.__isset.started = true; + setStartedIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -689,14 +922,17 @@ public class Task implements TBase, java.io.Serializable, Cloneable { oprot.writeString(this.taskId); oprot.writeFieldEnd(); } - oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); - oprot.writeI32(this.taskType); - oprot.writeFieldEnd(); + if (this.taskType != null) { + oprot.writeFieldBegin(TASK_TYPE_FIELD_DESC); + oprot.writeI32(this.taskType.getValue()); + oprot.writeFieldEnd(); + } if (this.taskAttributes != null) { oprot.writeFieldBegin(TASK_ATTRIBUTES_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.taskAttributes.size())); - for (Map.Entry _iter33 : this.taskAttributes.entrySet()) { + for (Map.Entry _iter33 : this.taskAttributes.entrySet()) + { oprot.writeString(_iter33.getKey()); oprot.writeString(_iter33.getValue()); } @@ -708,7 +944,8 @@ public class Task implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(TASK_COUNTERS_FIELD_DESC); { oprot.writeMapBegin(new TMap(TType.STRING, TType.I64, this.taskCounters.size())); - for (Map.Entry _iter34 : this.taskCounters.entrySet()) { + for (Map.Entry _iter34 : this.taskCounters.entrySet()) + { oprot.writeString(_iter34.getKey()); oprot.writeI64(_iter34.getValue()); } @@ -728,7 +965,8 @@ public class Task implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(OPERATOR_LIST_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.operatorList.size())); - for (Operator _iter35 : this.operatorList) { + for (Operator _iter35 : this.operatorList) + { _iter35.write(oprot); } oprot.writeListEnd(); @@ -760,14 +998,10 @@ public class Task implements TBase, java.io.Serializable, Cloneable { first = false; if (!first) sb.append(", "); sb.append("taskType:"); - String taskType_name = TaskType.VALUES_TO_NAMES.get(this.taskType); - if (taskType_name != null) { - sb.append(taskType_name); - sb.append(" ("); - } - sb.append(this.taskType); - if (taskType_name != null) { - sb.append(")"); + if (this.taskType == null) { + sb.append("null"); + } else { + sb.append(this.taskType); } first = false; if (!first) sb.append(", "); @@ -820,10 +1054,6 @@ public class Task implements TBase, java.io.Serializable, Cloneable { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetTaskType() && !TaskType.VALID_VALUES.contains(taskType)){ - throw new TProtocolException("The field 'taskType' has been assigned the invalid value " + taskType); - } } } diff --git ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java index 4a04117..001d495 100644 --- ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java +++ ql/src/gen-javabean/org/apache/hadoop/hive/ql/plan/api/TaskType.java @@ -6,26 +6,42 @@ package org.apache.hadoop.hive.ql.plan.api; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.thrift.IntRangeSet; import java.util.Map; import java.util.HashMap; +import org.apache.thrift.TEnum; -public class TaskType { - public static final int MAP = 0; - public static final int REDUCE = 1; - public static final int OTHER = 2; +public enum TaskType implements TEnum { + MAP(0), + REDUCE(1), + OTHER(2); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - MAP, - REDUCE, - OTHER ); + private final int value; - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(MAP, "MAP"); - put(REDUCE, "REDUCE"); - put(OTHER, "OTHER"); - }}; + private TaskType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static TaskType findByValue(int value) { + switch (value) { + case 0: + return MAP; + case 1: + return REDUCE; + case 2: + return OTHER; + default: + return null; + } + } } diff --git ql/src/gen-php/queryplan/queryplan_types.php ql/src/gen-php/queryplan/queryplan_types.php new file mode 100644 index 0000000..5060b0e --- /dev/null +++ ql/src/gen-php/queryplan/queryplan_types.php @@ -0,0 +1,1753 @@ + 0, + 'DISJUNCTIVE' => 1, +); + +final class AdjacencyType { + const CONJUNCTIVE = 0; + const DISJUNCTIVE = 1; + static public $__names = array( + 0 => 'CONJUNCTIVE', + 1 => 'DISJUNCTIVE', + ); +} + +$GLOBALS['E_NodeType'] = array( + 'OPERATOR' => 0, + 'STAGE' => 1, +); + +final class NodeType { + const OPERATOR = 0; + const STAGE = 1; + static public $__names = array( + 0 => 'OPERATOR', + 1 => 'STAGE', + ); +} + +$GLOBALS['E_OperatorType'] = array( + 'JOIN' => 0, + 'MAPJOIN' => 1, + 'EXTRACT' => 2, + 'FILTER' => 3, + 'FORWARD' => 4, + 'GROUPBY' => 5, + 'LIMIT' => 6, + 'SCRIPT' => 7, + 'SELECT' => 8, + 'TABLESCAN' => 9, + 'FILESINK' => 10, + 'REDUCESINK' => 11, + 'UNION' => 12, + 'UDTF' => 13, + 'LATERALVIEWJOIN' => 14, + 'LATERALVIEWFORWARD' => 15, + 'HASHTABLESINK' => 16, + 'HASHTABLEDUMMY' => 17, +); + +final class OperatorType { + const JOIN = 0; + const MAPJOIN = 1; + const EXTRACT = 2; + const FILTER = 3; + const FORWARD = 4; + const GROUPBY = 5; + const LIMIT = 6; + const SCRIPT = 7; + const SELECT = 8; + const TABLESCAN = 9; + const FILESINK = 10; + const REDUCESINK = 11; + const UNION = 12; + const UDTF = 13; + const LATERALVIEWJOIN = 14; + const LATERALVIEWFORWARD = 15; + const HASHTABLESINK = 16; + const HASHTABLEDUMMY = 17; + static public $__names = array( + 0 => 'JOIN', + 1 => 'MAPJOIN', + 2 => 'EXTRACT', + 3 => 'FILTER', + 4 => 'FORWARD', + 5 => 'GROUPBY', + 6 => 'LIMIT', + 7 => 'SCRIPT', + 8 => 'SELECT', + 9 => 'TABLESCAN', + 10 => 'FILESINK', + 11 => 'REDUCESINK', + 12 => 'UNION', + 13 => 'UDTF', + 14 => 'LATERALVIEWJOIN', + 15 => 'LATERALVIEWFORWARD', + 16 => 'HASHTABLESINK', + 17 => 'HASHTABLEDUMMY', + ); +} + +$GLOBALS['E_TaskType'] = array( + 'MAP' => 0, + 'REDUCE' => 1, + 'OTHER' => 2, +); + +final class TaskType { + const MAP = 0; + const REDUCE = 1; + const OTHER = 2; + static public $__names = array( + 0 => 'MAP', + 1 => 'REDUCE', + 2 => 'OTHER', + ); +} + +$GLOBALS['E_StageType'] = array( + 'CONDITIONAL' => 0, + 'COPY' => 1, + 'DDL' => 2, + 'MAPRED' => 3, + 'EXPLAIN' => 4, + 'FETCH' => 5, + 'FUNC' => 6, + 'MAPREDLOCAL' => 7, + 'MOVE' => 8, + 'STATS' => 9, +); + +final class StageType { + const CONDITIONAL = 0; + const COPY = 1; + const DDL = 2; + const MAPRED = 3; + const EXPLAIN = 4; + const FETCH = 5; + const FUNC = 6; + const MAPREDLOCAL = 7; + const MOVE = 8; + const STATS = 9; + static public $__names = array( + 0 => 'CONDITIONAL', + 1 => 'COPY', + 2 => 'DDL', + 3 => 'MAPRED', + 4 => 'EXPLAIN', + 5 => 'FETCH', + 6 => 'FUNC', + 7 => 'MAPREDLOCAL', + 8 => 'MOVE', + 9 => 'STATS', + ); +} + +class Adjacency { + static $_TSPEC; + + public $node = null; + public $children = null; + public $adjacencyType = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'node', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'children', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyType', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['node'])) { + $this->node = $vals['node']; + } + if (isset($vals['children'])) { + $this->children = $vals['children']; + } + if (isset($vals['adjacencyType'])) { + $this->adjacencyType = $vals['adjacencyType']; + } + } + } + + public function getName() { + return 'Adjacency'; + } + + 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->node); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->children = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->children []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->adjacencyType); + } 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('Adjacency'); + if ($this->node !== null) { + $xfer += $output->writeFieldBegin('node', TType::STRING, 1); + $xfer += $output->writeString($this->node); + $xfer += $output->writeFieldEnd(); + } + if ($this->children !== null) { + if (!is_array($this->children)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('children', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->children)); + { + foreach ($this->children as $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyType !== null) { + $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3); + $xfer += $output->writeI32($this->adjacencyType); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Graph { + static $_TSPEC; + + public $nodeType = null; + public $roots = null; + public $adjacencyList = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'nodeType', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'roots', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'adjacencyList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Adjacency', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['nodeType'])) { + $this->nodeType = $vals['nodeType']; + } + if (isset($vals['roots'])) { + $this->roots = $vals['roots']; + } + if (isset($vals['adjacencyList'])) { + $this->adjacencyList = $vals['adjacencyList']; + } + } + } + + public function getName() { + return 'Graph'; + } + + 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::I32) { + $xfer += $input->readI32($this->nodeType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->roots = array(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->roots []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->adjacencyList = array(); + $_size13 = 0; + $_etype16 = 0; + $xfer += $input->readListBegin($_etype16, $_size13); + for ($_i17 = 0; $_i17 < $_size13; ++$_i17) + { + $elem18 = null; + $elem18 = new Adjacency(); + $xfer += $elem18->read($input); + $this->adjacencyList []= $elem18; + } + $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('Graph'); + if ($this->nodeType !== null) { + $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1); + $xfer += $output->writeI32($this->nodeType); + $xfer += $output->writeFieldEnd(); + } + if ($this->roots !== null) { + if (!is_array($this->roots)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('roots', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->roots)); + { + foreach ($this->roots as $iter19) + { + $xfer += $output->writeString($iter19); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->adjacencyList !== null) { + if (!is_array($this->adjacencyList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->adjacencyList)); + { + foreach ($this->adjacencyList as $iter20) + { + $xfer += $iter20->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Operator { + static $_TSPEC; + + public $operatorId = null; + public $operatorType = null; + public $operatorAttributes = null; + public $operatorCounters = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'operatorId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'operatorType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'operatorAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'operatorCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 6 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['operatorId'])) { + $this->operatorId = $vals['operatorId']; + } + if (isset($vals['operatorType'])) { + $this->operatorType = $vals['operatorType']; + } + if (isset($vals['operatorAttributes'])) { + $this->operatorAttributes = $vals['operatorAttributes']; + } + if (isset($vals['operatorCounters'])) { + $this->operatorCounters = $vals['operatorCounters']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Operator'; + } + + 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->operatorId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->operatorType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->operatorAttributes = array(); + $_size21 = 0; + $_ktype22 = 0; + $_vtype23 = 0; + $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); + for ($_i25 = 0; $_i25 < $_size21; ++$_i25) + { + $key26 = ''; + $val27 = ''; + $xfer += $input->readString($key26); + $xfer += $input->readString($val27); + $this->operatorAttributes[$key26] = $val27; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->operatorCounters = array(); + $_size28 = 0; + $_ktype29 = 0; + $_vtype30 = 0; + $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28); + for ($_i32 = 0; $_i32 < $_size28; ++$_i32) + { + $key33 = ''; + $val34 = 0; + $xfer += $input->readString($key33); + $xfer += $input->readI64($val34); + $this->operatorCounters[$key33] = $val34; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Operator'); + if ($this->operatorId !== null) { + $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1); + $xfer += $output->writeString($this->operatorId); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorType !== null) { + $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2); + $xfer += $output->writeI32($this->operatorType); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorAttributes !== null) { + if (!is_array($this->operatorAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes)); + { + foreach ($this->operatorAttributes as $kiter35 => $viter36) + { + $xfer += $output->writeString($kiter35); + $xfer += $output->writeString($viter36); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorCounters !== null) { + if (!is_array($this->operatorCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters)); + { + foreach ($this->operatorCounters as $kiter37 => $viter38) + { + $xfer += $output->writeString($kiter37); + $xfer += $output->writeI64($viter38); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 5); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 6); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Task { + static $_TSPEC; + + public $taskId = null; + public $taskType = null; + public $taskAttributes = null; + public $taskCounters = null; + public $operatorGraph = null; + public $operatorList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'taskType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'taskAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'taskCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'operatorGraph', + 'type' => TType::STRUCT, + 'class' => 'Graph', + ), + 6 => array( + 'var' => 'operatorList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Operator', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskId'])) { + $this->taskId = $vals['taskId']; + } + if (isset($vals['taskType'])) { + $this->taskType = $vals['taskType']; + } + if (isset($vals['taskAttributes'])) { + $this->taskAttributes = $vals['taskAttributes']; + } + if (isset($vals['taskCounters'])) { + $this->taskCounters = $vals['taskCounters']; + } + if (isset($vals['operatorGraph'])) { + $this->operatorGraph = $vals['operatorGraph']; + } + if (isset($vals['operatorList'])) { + $this->operatorList = $vals['operatorList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Task'; + } + + 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->taskId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->taskType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->taskAttributes = array(); + $_size39 = 0; + $_ktype40 = 0; + $_vtype41 = 0; + $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39); + for ($_i43 = 0; $_i43 < $_size39; ++$_i43) + { + $key44 = ''; + $val45 = ''; + $xfer += $input->readString($key44); + $xfer += $input->readString($val45); + $this->taskAttributes[$key44] = $val45; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->taskCounters = array(); + $_size46 = 0; + $_ktype47 = 0; + $_vtype48 = 0; + $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $key51 = ''; + $val52 = 0; + $xfer += $input->readString($key51); + $xfer += $input->readI64($val52); + $this->taskCounters[$key51] = $val52; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->operatorGraph = new Graph(); + $xfer += $this->operatorGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->operatorList = array(); + $_size53 = 0; + $_etype56 = 0; + $xfer += $input->readListBegin($_etype56, $_size53); + for ($_i57 = 0; $_i57 < $_size53; ++$_i57) + { + $elem58 = null; + $elem58 = new Operator(); + $xfer += $elem58->read($input); + $this->operatorList []= $elem58; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Task'); + if ($this->taskId !== null) { + $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); + $xfer += $output->writeString($this->taskId); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskType !== null) { + $xfer += $output->writeFieldBegin('taskType', TType::I32, 2); + $xfer += $output->writeI32($this->taskType); + $xfer += $output->writeFieldEnd(); + } + if ($this->taskAttributes !== null) { + if (!is_array($this->taskAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes)); + { + foreach ($this->taskAttributes as $kiter59 => $viter60) + { + $xfer += $output->writeString($kiter59); + $xfer += $output->writeString($viter60); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskCounters !== null) { + if (!is_array($this->taskCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters)); + { + foreach ($this->taskCounters as $kiter61 => $viter62) + { + $xfer += $output->writeString($kiter61); + $xfer += $output->writeI64($viter62); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorGraph !== null) { + if (!is_object($this->operatorGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5); + $xfer += $this->operatorGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->operatorList !== null) { + if (!is_array($this->operatorList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->operatorList)); + { + foreach ($this->operatorList as $iter63) + { + $xfer += $iter63->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Stage { + static $_TSPEC; + + public $stageId = null; + public $stageType = null; + public $stageAttributes = null; + public $stageCounters = null; + public $taskList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'stageId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'stageType', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'stageAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'stageCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'taskList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Task', + ), + ), + 6 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 7 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['stageId'])) { + $this->stageId = $vals['stageId']; + } + if (isset($vals['stageType'])) { + $this->stageType = $vals['stageType']; + } + if (isset($vals['stageAttributes'])) { + $this->stageAttributes = $vals['stageAttributes']; + } + if (isset($vals['stageCounters'])) { + $this->stageCounters = $vals['stageCounters']; + } + if (isset($vals['taskList'])) { + $this->taskList = $vals['taskList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Stage'; + } + + 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->stageId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->stageType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->stageAttributes = array(); + $_size64 = 0; + $_ktype65 = 0; + $_vtype66 = 0; + $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64); + for ($_i68 = 0; $_i68 < $_size64; ++$_i68) + { + $key69 = ''; + $val70 = ''; + $xfer += $input->readString($key69); + $xfer += $input->readString($val70); + $this->stageAttributes[$key69] = $val70; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->stageCounters = array(); + $_size71 = 0; + $_ktype72 = 0; + $_vtype73 = 0; + $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71); + for ($_i75 = 0; $_i75 < $_size71; ++$_i75) + { + $key76 = ''; + $val77 = 0; + $xfer += $input->readString($key76); + $xfer += $input->readI64($val77); + $this->stageCounters[$key76] = $val77; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::LST) { + $this->taskList = array(); + $_size78 = 0; + $_etype81 = 0; + $xfer += $input->readListBegin($_etype81, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $elem83 = null; + $elem83 = new Task(); + $xfer += $elem83->read($input); + $this->taskList []= $elem83; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Stage'); + if ($this->stageId !== null) { + $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1); + $xfer += $output->writeString($this->stageId); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageType !== null) { + $xfer += $output->writeFieldBegin('stageType', TType::I32, 2); + $xfer += $output->writeI32($this->stageType); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageAttributes !== null) { + if (!is_array($this->stageAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes)); + { + foreach ($this->stageAttributes as $kiter84 => $viter85) + { + $xfer += $output->writeString($kiter84); + $xfer += $output->writeString($viter85); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageCounters !== null) { + if (!is_array($this->stageCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters)); + { + foreach ($this->stageCounters as $kiter86 => $viter87) + { + $xfer += $output->writeString($kiter86); + $xfer += $output->writeI64($viter87); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->taskList !== null) { + if (!is_array($this->taskList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('taskList', TType::LST, 5); + { + $output->writeListBegin(TType::STRUCT, count($this->taskList)); + { + foreach ($this->taskList as $iter88) + { + $xfer += $iter88->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 6); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 7); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Query { + static $_TSPEC; + + public $queryId = null; + public $queryType = null; + public $queryAttributes = null; + public $queryCounters = null; + public $stageGraph = null; + public $stageList = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queryId', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'queryType', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'queryAttributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'queryCounters', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::I64, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::I64, + ), + ), + 5 => array( + 'var' => 'stageGraph', + 'type' => TType::STRUCT, + 'class' => 'Graph', + ), + 6 => array( + 'var' => 'stageList', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Stage', + ), + ), + 7 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 8 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queryId'])) { + $this->queryId = $vals['queryId']; + } + if (isset($vals['queryType'])) { + $this->queryType = $vals['queryType']; + } + if (isset($vals['queryAttributes'])) { + $this->queryAttributes = $vals['queryAttributes']; + } + if (isset($vals['queryCounters'])) { + $this->queryCounters = $vals['queryCounters']; + } + if (isset($vals['stageGraph'])) { + $this->stageGraph = $vals['stageGraph']; + } + if (isset($vals['stageList'])) { + $this->stageList = $vals['stageList']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'Query'; + } + + 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->queryId); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->queryType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->queryAttributes = array(); + $_size89 = 0; + $_ktype90 = 0; + $_vtype91 = 0; + $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89); + for ($_i93 = 0; $_i93 < $_size89; ++$_i93) + { + $key94 = ''; + $val95 = ''; + $xfer += $input->readString($key94); + $xfer += $input->readString($val95); + $this->queryAttributes[$key94] = $val95; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->queryCounters = array(); + $_size96 = 0; + $_ktype97 = 0; + $_vtype98 = 0; + $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96); + for ($_i100 = 0; $_i100 < $_size96; ++$_i100) + { + $key101 = ''; + $val102 = 0; + $xfer += $input->readString($key101); + $xfer += $input->readI64($val102); + $this->queryCounters[$key101] = $val102; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRUCT) { + $this->stageGraph = new Graph(); + $xfer += $this->stageGraph->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::LST) { + $this->stageList = array(); + $_size103 = 0; + $_etype106 = 0; + $xfer += $input->readListBegin($_etype106, $_size103); + for ($_i107 = 0; $_i107 < $_size103; ++$_i107) + { + $elem108 = null; + $elem108 = new Stage(); + $xfer += $elem108->read($input); + $this->stageList []= $elem108; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('Query'); + if ($this->queryId !== null) { + $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1); + $xfer += $output->writeString($this->queryId); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryType !== null) { + $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2); + $xfer += $output->writeString($this->queryType); + $xfer += $output->writeFieldEnd(); + } + if ($this->queryAttributes !== null) { + if (!is_array($this->queryAttributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes)); + { + foreach ($this->queryAttributes as $kiter109 => $viter110) + { + $xfer += $output->writeString($kiter109); + $xfer += $output->writeString($viter110); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->queryCounters !== null) { + if (!is_array($this->queryCounters)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters)); + { + foreach ($this->queryCounters as $kiter111 => $viter112) + { + $xfer += $output->writeString($kiter111); + $xfer += $output->writeI64($viter112); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->stageGraph !== null) { + if (!is_object($this->stageGraph)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5); + $xfer += $this->stageGraph->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->stageList !== null) { + if (!is_array($this->stageList)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('stageList', TType::LST, 6); + { + $output->writeListBegin(TType::STRUCT, count($this->stageList)); + { + foreach ($this->stageList as $iter113) + { + $xfer += $iter113->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class QueryPlan { + static $_TSPEC; + + public $queries = null; + public $done = null; + public $started = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'queries', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Query', + ), + ), + 2 => array( + 'var' => 'done', + 'type' => TType::BOOL, + ), + 3 => array( + 'var' => 'started', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['queries'])) { + $this->queries = $vals['queries']; + } + if (isset($vals['done'])) { + $this->done = $vals['done']; + } + if (isset($vals['started'])) { + $this->started = $vals['started']; + } + } + } + + public function getName() { + return 'QueryPlan'; + } + + 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::LST) { + $this->queries = array(); + $_size114 = 0; + $_etype117 = 0; + $xfer += $input->readListBegin($_etype117, $_size114); + for ($_i118 = 0; $_i118 < $_size114; ++$_i118) + { + $elem119 = null; + $elem119 = new Query(); + $xfer += $elem119->read($input); + $this->queries []= $elem119; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->done); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->started); + } 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('QueryPlan'); + if ($this->queries !== null) { + if (!is_array($this->queries)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('queries', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->queries)); + { + foreach ($this->queries as $iter120) + { + $xfer += $iter120->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->done !== null) { + $xfer += $output->writeFieldBegin('done', TType::BOOL, 2); + $xfer += $output->writeBool($this->done); + $xfer += $output->writeFieldEnd(); + } + if ($this->started !== null) { + $xfer += $output->writeFieldBegin('started', TType::BOOL, 3); + $xfer += $output->writeBool($this->started); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git ql/src/gen-php/queryplan_types.php ql/src/gen-php/queryplan_types.php deleted file mode 100644 index 3a56a99..0000000 --- ql/src/gen-php/queryplan_types.php +++ /dev/null @@ -1,1744 +0,0 @@ - 0, - 'DISJUNCTIVE' => 1, -); - -final class AdjacencyType { - const CONJUNCTIVE = 0; - const DISJUNCTIVE = 1; - static public $__names = array( - 0 => 'CONJUNCTIVE', - 1 => 'DISJUNCTIVE', - ); -} - -$GLOBALS['E_NodeType'] = array( - 'OPERATOR' => 0, - 'STAGE' => 1, -); - -final class NodeType { - const OPERATOR = 0; - const STAGE = 1; - static public $__names = array( - 0 => 'OPERATOR', - 1 => 'STAGE', - ); -} - -$GLOBALS['E_OperatorType'] = array( - 'JOIN' => 0, - 'MAPJOIN' => 1, - 'EXTRACT' => 2, - 'FILTER' => 3, - 'FORWARD' => 4, - 'GROUPBY' => 5, - 'LIMIT' => 6, - 'SCRIPT' => 7, - 'SELECT' => 8, - 'TABLESCAN' => 9, - 'FILESINK' => 10, - 'REDUCESINK' => 11, - 'UNION' => 12, - 'UDTF' => 13, - 'LATERALVIEWJOIN' => 14, - 'LATERALVIEWFORWARD' => 15, -); - -final class OperatorType { - const JOIN = 0; - const MAPJOIN = 1; - const EXTRACT = 2; - const FILTER = 3; - const FORWARD = 4; - const GROUPBY = 5; - const LIMIT = 6; - const SCRIPT = 7; - const SELECT = 8; - const TABLESCAN = 9; - const FILESINK = 10; - const REDUCESINK = 11; - const UNION = 12; - const UDTF = 13; - const LATERALVIEWJOIN = 14; - const LATERALVIEWFORWARD = 15; - static public $__names = array( - 0 => 'JOIN', - 1 => 'MAPJOIN', - 2 => 'EXTRACT', - 3 => 'FILTER', - 4 => 'FORWARD', - 5 => 'GROUPBY', - 6 => 'LIMIT', - 7 => 'SCRIPT', - 8 => 'SELECT', - 9 => 'TABLESCAN', - 10 => 'FILESINK', - 11 => 'REDUCESINK', - 12 => 'UNION', - 13 => 'UDTF', - 14 => 'LATERALVIEWJOIN', - 15 => 'LATERALVIEWFORWARD', - ); -} - -$GLOBALS['E_TaskType'] = array( - 'MAP' => 0, - 'REDUCE' => 1, - 'OTHER' => 2, -); - -final class TaskType { - const MAP = 0; - const REDUCE = 1; - const OTHER = 2; - static public $__names = array( - 0 => 'MAP', - 1 => 'REDUCE', - 2 => 'OTHER', - ); -} - -$GLOBALS['E_StageType'] = array( - 'CONDITIONAL' => 0, - 'COPY' => 1, - 'DDL' => 2, - 'MAPRED' => 3, - 'EXPLAIN' => 4, - 'FETCH' => 5, - 'FUNC' => 6, - 'MAPREDLOCAL' => 7, - 'MOVE' => 8, -); - -final class StageType { - const CONDITIONAL = 0; - const COPY = 1; - const DDL = 2; - const MAPRED = 3; - const EXPLAIN = 4; - const FETCH = 5; - const FUNC = 6; - const MAPREDLOCAL = 7; - const MOVE = 8; - static public $__names = array( - 0 => 'CONDITIONAL', - 1 => 'COPY', - 2 => 'DDL', - 3 => 'MAPRED', - 4 => 'EXPLAIN', - 5 => 'FETCH', - 6 => 'FUNC', - 7 => 'MAPREDLOCAL', - 8 => 'MOVE', - ); -} - -class Adjacency { - static $_TSPEC; - - public $node = null; - public $children = null; - public $adjacencyType = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'node', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'children', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'adjacencyType', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['node'])) { - $this->node = $vals['node']; - } - if (isset($vals['children'])) { - $this->children = $vals['children']; - } - if (isset($vals['adjacencyType'])) { - $this->adjacencyType = $vals['adjacencyType']; - } - } - } - - public function getName() { - return 'Adjacency'; - } - - 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->node); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->children = array(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $xfer += $input->readString($elem5); - $this->children []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->adjacencyType); - } 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('Adjacency'); - if ($this->node !== null) { - $xfer += $output->writeFieldBegin('node', TType::STRING, 1); - $xfer += $output->writeString($this->node); - $xfer += $output->writeFieldEnd(); - } - if ($this->children !== null) { - if (!is_array($this->children)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('children', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->children)); - { - foreach ($this->children as $iter6) - { - $xfer += $output->writeString($iter6); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->adjacencyType !== null) { - $xfer += $output->writeFieldBegin('adjacencyType', TType::I32, 3); - $xfer += $output->writeI32($this->adjacencyType); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Graph { - static $_TSPEC; - - public $nodeType = null; - public $roots = null; - public $adjacencyList = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'nodeType', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'roots', - 'type' => TType::LST, - 'etype' => TType::STRING, - 'elem' => array( - 'type' => TType::STRING, - ), - ), - 3 => array( - 'var' => 'adjacencyList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Adjacency', - ), - ), - ); - } - if (is_array($vals)) { - if (isset($vals['nodeType'])) { - $this->nodeType = $vals['nodeType']; - } - if (isset($vals['roots'])) { - $this->roots = $vals['roots']; - } - if (isset($vals['adjacencyList'])) { - $this->adjacencyList = $vals['adjacencyList']; - } - } - } - - public function getName() { - return 'Graph'; - } - - 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::I32) { - $xfer += $input->readI32($this->nodeType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::LST) { - $this->roots = array(); - $_size7 = 0; - $_etype10 = 0; - $xfer += $input->readListBegin($_etype10, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) - { - $elem12 = null; - $xfer += $input->readString($elem12); - $this->roots []= $elem12; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::LST) { - $this->adjacencyList = array(); - $_size13 = 0; - $_etype16 = 0; - $xfer += $input->readListBegin($_etype16, $_size13); - for ($_i17 = 0; $_i17 < $_size13; ++$_i17) - { - $elem18 = null; - $elem18 = new Adjacency(); - $xfer += $elem18->read($input); - $this->adjacencyList []= $elem18; - } - $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('Graph'); - if ($this->nodeType !== null) { - $xfer += $output->writeFieldBegin('nodeType', TType::I32, 1); - $xfer += $output->writeI32($this->nodeType); - $xfer += $output->writeFieldEnd(); - } - if ($this->roots !== null) { - if (!is_array($this->roots)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('roots', TType::LST, 2); - { - $output->writeListBegin(TType::STRING, count($this->roots)); - { - foreach ($this->roots as $iter19) - { - $xfer += $output->writeString($iter19); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->adjacencyList !== null) { - if (!is_array($this->adjacencyList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('adjacencyList', TType::LST, 3); - { - $output->writeListBegin(TType::STRUCT, count($this->adjacencyList)); - { - foreach ($this->adjacencyList as $iter20) - { - $xfer += $iter20->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Operator { - static $_TSPEC; - - public $operatorId = null; - public $operatorType = null; - public $operatorAttributes = null; - public $operatorCounters = null; - public $done = null; - public $started = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'operatorId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'operatorType', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'operatorAttributes', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'operatorCounters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::I64, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::I64, - ), - ), - 5 => array( - 'var' => 'done', - 'type' => TType::BOOL, - ), - 6 => array( - 'var' => 'started', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['operatorId'])) { - $this->operatorId = $vals['operatorId']; - } - if (isset($vals['operatorType'])) { - $this->operatorType = $vals['operatorType']; - } - if (isset($vals['operatorAttributes'])) { - $this->operatorAttributes = $vals['operatorAttributes']; - } - if (isset($vals['operatorCounters'])) { - $this->operatorCounters = $vals['operatorCounters']; - } - if (isset($vals['done'])) { - $this->done = $vals['done']; - } - if (isset($vals['started'])) { - $this->started = $vals['started']; - } - } - } - - public function getName() { - return 'Operator'; - } - - 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->operatorId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->operatorType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->operatorAttributes = array(); - $_size21 = 0; - $_ktype22 = 0; - $_vtype23 = 0; - $xfer += $input->readMapBegin($_ktype22, $_vtype23, $_size21); - for ($_i25 = 0; $_i25 < $_size21; ++$_i25) - { - $key26 = ''; - $val27 = ''; - $xfer += $input->readString($key26); - $xfer += $input->readString($val27); - $this->operatorAttributes[$key26] = $val27; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->operatorCounters = array(); - $_size28 = 0; - $_ktype29 = 0; - $_vtype30 = 0; - $xfer += $input->readMapBegin($_ktype29, $_vtype30, $_size28); - for ($_i32 = 0; $_i32 < $_size28; ++$_i32) - { - $key33 = ''; - $val34 = 0; - $xfer += $input->readString($key33); - $xfer += $input->readI64($val34); - $this->operatorCounters[$key33] = $val34; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->done); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->started); - } 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('Operator'); - if ($this->operatorId !== null) { - $xfer += $output->writeFieldBegin('operatorId', TType::STRING, 1); - $xfer += $output->writeString($this->operatorId); - $xfer += $output->writeFieldEnd(); - } - if ($this->operatorType !== null) { - $xfer += $output->writeFieldBegin('operatorType', TType::I32, 2); - $xfer += $output->writeI32($this->operatorType); - $xfer += $output->writeFieldEnd(); - } - if ($this->operatorAttributes !== null) { - if (!is_array($this->operatorAttributes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('operatorAttributes', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->operatorAttributes)); - { - foreach ($this->operatorAttributes as $kiter35 => $viter36) - { - $xfer += $output->writeString($kiter35); - $xfer += $output->writeString($viter36); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->operatorCounters !== null) { - if (!is_array($this->operatorCounters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('operatorCounters', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::I64, count($this->operatorCounters)); - { - foreach ($this->operatorCounters as $kiter37 => $viter38) - { - $xfer += $output->writeString($kiter37); - $xfer += $output->writeI64($viter38); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->done !== null) { - $xfer += $output->writeFieldBegin('done', TType::BOOL, 5); - $xfer += $output->writeBool($this->done); - $xfer += $output->writeFieldEnd(); - } - if ($this->started !== null) { - $xfer += $output->writeFieldBegin('started', TType::BOOL, 6); - $xfer += $output->writeBool($this->started); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Task { - static $_TSPEC; - - public $taskId = null; - public $taskType = null; - public $taskAttributes = null; - public $taskCounters = null; - public $operatorGraph = null; - public $operatorList = null; - public $done = null; - public $started = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'taskId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'taskType', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'taskAttributes', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'taskCounters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::I64, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::I64, - ), - ), - 5 => array( - 'var' => 'operatorGraph', - 'type' => TType::STRUCT, - 'class' => 'Graph', - ), - 6 => array( - 'var' => 'operatorList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Operator', - ), - ), - 7 => array( - 'var' => 'done', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'started', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['taskId'])) { - $this->taskId = $vals['taskId']; - } - if (isset($vals['taskType'])) { - $this->taskType = $vals['taskType']; - } - if (isset($vals['taskAttributes'])) { - $this->taskAttributes = $vals['taskAttributes']; - } - if (isset($vals['taskCounters'])) { - $this->taskCounters = $vals['taskCounters']; - } - if (isset($vals['operatorGraph'])) { - $this->operatorGraph = $vals['operatorGraph']; - } - if (isset($vals['operatorList'])) { - $this->operatorList = $vals['operatorList']; - } - if (isset($vals['done'])) { - $this->done = $vals['done']; - } - if (isset($vals['started'])) { - $this->started = $vals['started']; - } - } - } - - public function getName() { - return 'Task'; - } - - 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->taskId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->taskType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->taskAttributes = array(); - $_size39 = 0; - $_ktype40 = 0; - $_vtype41 = 0; - $xfer += $input->readMapBegin($_ktype40, $_vtype41, $_size39); - for ($_i43 = 0; $_i43 < $_size39; ++$_i43) - { - $key44 = ''; - $val45 = ''; - $xfer += $input->readString($key44); - $xfer += $input->readString($val45); - $this->taskAttributes[$key44] = $val45; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->taskCounters = array(); - $_size46 = 0; - $_ktype47 = 0; - $_vtype48 = 0; - $xfer += $input->readMapBegin($_ktype47, $_vtype48, $_size46); - for ($_i50 = 0; $_i50 < $_size46; ++$_i50) - { - $key51 = ''; - $val52 = 0; - $xfer += $input->readString($key51); - $xfer += $input->readI64($val52); - $this->taskCounters[$key51] = $val52; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->operatorGraph = new Graph(); - $xfer += $this->operatorGraph->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->operatorList = array(); - $_size53 = 0; - $_etype56 = 0; - $xfer += $input->readListBegin($_etype56, $_size53); - for ($_i57 = 0; $_i57 < $_size53; ++$_i57) - { - $elem58 = null; - $elem58 = new Operator(); - $xfer += $elem58->read($input); - $this->operatorList []= $elem58; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->done); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->started); - } 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('Task'); - if ($this->taskId !== null) { - $xfer += $output->writeFieldBegin('taskId', TType::STRING, 1); - $xfer += $output->writeString($this->taskId); - $xfer += $output->writeFieldEnd(); - } - if ($this->taskType !== null) { - $xfer += $output->writeFieldBegin('taskType', TType::I32, 2); - $xfer += $output->writeI32($this->taskType); - $xfer += $output->writeFieldEnd(); - } - if ($this->taskAttributes !== null) { - if (!is_array($this->taskAttributes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('taskAttributes', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->taskAttributes)); - { - foreach ($this->taskAttributes as $kiter59 => $viter60) - { - $xfer += $output->writeString($kiter59); - $xfer += $output->writeString($viter60); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->taskCounters !== null) { - if (!is_array($this->taskCounters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('taskCounters', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::I64, count($this->taskCounters)); - { - foreach ($this->taskCounters as $kiter61 => $viter62) - { - $xfer += $output->writeString($kiter61); - $xfer += $output->writeI64($viter62); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->operatorGraph !== null) { - if (!is_object($this->operatorGraph)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('operatorGraph', TType::STRUCT, 5); - $xfer += $this->operatorGraph->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->operatorList !== null) { - if (!is_array($this->operatorList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('operatorList', TType::LST, 6); - { - $output->writeListBegin(TType::STRUCT, count($this->operatorList)); - { - foreach ($this->operatorList as $iter63) - { - $xfer += $iter63->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->done !== null) { - $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); - $xfer += $output->writeBool($this->done); - $xfer += $output->writeFieldEnd(); - } - if ($this->started !== null) { - $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); - $xfer += $output->writeBool($this->started); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Stage { - static $_TSPEC; - - public $stageId = null; - public $stageType = null; - public $stageAttributes = null; - public $stageCounters = null; - public $taskList = null; - public $done = null; - public $started = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'stageId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'stageType', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'stageAttributes', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'stageCounters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::I64, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::I64, - ), - ), - 5 => array( - 'var' => 'taskList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Task', - ), - ), - 6 => array( - 'var' => 'done', - 'type' => TType::BOOL, - ), - 7 => array( - 'var' => 'started', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['stageId'])) { - $this->stageId = $vals['stageId']; - } - if (isset($vals['stageType'])) { - $this->stageType = $vals['stageType']; - } - if (isset($vals['stageAttributes'])) { - $this->stageAttributes = $vals['stageAttributes']; - } - if (isset($vals['stageCounters'])) { - $this->stageCounters = $vals['stageCounters']; - } - if (isset($vals['taskList'])) { - $this->taskList = $vals['taskList']; - } - if (isset($vals['done'])) { - $this->done = $vals['done']; - } - if (isset($vals['started'])) { - $this->started = $vals['started']; - } - } - } - - public function getName() { - return 'Stage'; - } - - 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->stageId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->stageType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->stageAttributes = array(); - $_size64 = 0; - $_ktype65 = 0; - $_vtype66 = 0; - $xfer += $input->readMapBegin($_ktype65, $_vtype66, $_size64); - for ($_i68 = 0; $_i68 < $_size64; ++$_i68) - { - $key69 = ''; - $val70 = ''; - $xfer += $input->readString($key69); - $xfer += $input->readString($val70); - $this->stageAttributes[$key69] = $val70; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->stageCounters = array(); - $_size71 = 0; - $_ktype72 = 0; - $_vtype73 = 0; - $xfer += $input->readMapBegin($_ktype72, $_vtype73, $_size71); - for ($_i75 = 0; $_i75 < $_size71; ++$_i75) - { - $key76 = ''; - $val77 = 0; - $xfer += $input->readString($key76); - $xfer += $input->readI64($val77); - $this->stageCounters[$key76] = $val77; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::LST) { - $this->taskList = array(); - $_size78 = 0; - $_etype81 = 0; - $xfer += $input->readListBegin($_etype81, $_size78); - for ($_i82 = 0; $_i82 < $_size78; ++$_i82) - { - $elem83 = null; - $elem83 = new Task(); - $xfer += $elem83->read($input); - $this->taskList []= $elem83; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->done); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->started); - } 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('Stage'); - if ($this->stageId !== null) { - $xfer += $output->writeFieldBegin('stageId', TType::STRING, 1); - $xfer += $output->writeString($this->stageId); - $xfer += $output->writeFieldEnd(); - } - if ($this->stageType !== null) { - $xfer += $output->writeFieldBegin('stageType', TType::I32, 2); - $xfer += $output->writeI32($this->stageType); - $xfer += $output->writeFieldEnd(); - } - if ($this->stageAttributes !== null) { - if (!is_array($this->stageAttributes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stageAttributes', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->stageAttributes)); - { - foreach ($this->stageAttributes as $kiter84 => $viter85) - { - $xfer += $output->writeString($kiter84); - $xfer += $output->writeString($viter85); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->stageCounters !== null) { - if (!is_array($this->stageCounters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stageCounters', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::I64, count($this->stageCounters)); - { - foreach ($this->stageCounters as $kiter86 => $viter87) - { - $xfer += $output->writeString($kiter86); - $xfer += $output->writeI64($viter87); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->taskList !== null) { - if (!is_array($this->taskList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('taskList', TType::LST, 5); - { - $output->writeListBegin(TType::STRUCT, count($this->taskList)); - { - foreach ($this->taskList as $iter88) - { - $xfer += $iter88->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->done !== null) { - $xfer += $output->writeFieldBegin('done', TType::BOOL, 6); - $xfer += $output->writeBool($this->done); - $xfer += $output->writeFieldEnd(); - } - if ($this->started !== null) { - $xfer += $output->writeFieldBegin('started', TType::BOOL, 7); - $xfer += $output->writeBool($this->started); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class Query { - static $_TSPEC; - - public $queryId = null; - public $queryType = null; - public $queryAttributes = null; - public $queryCounters = null; - public $stageGraph = null; - public $stageList = null; - public $done = null; - public $started = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'queryId', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'queryType', - 'type' => TType::STRING, - ), - 3 => array( - 'var' => 'queryAttributes', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::STRING, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::STRING, - ), - ), - 4 => array( - 'var' => 'queryCounters', - 'type' => TType::MAP, - 'ktype' => TType::STRING, - 'vtype' => TType::I64, - 'key' => array( - 'type' => TType::STRING, - ), - 'val' => array( - 'type' => TType::I64, - ), - ), - 5 => array( - 'var' => 'stageGraph', - 'type' => TType::STRUCT, - 'class' => 'Graph', - ), - 6 => array( - 'var' => 'stageList', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Stage', - ), - ), - 7 => array( - 'var' => 'done', - 'type' => TType::BOOL, - ), - 8 => array( - 'var' => 'started', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['queryId'])) { - $this->queryId = $vals['queryId']; - } - if (isset($vals['queryType'])) { - $this->queryType = $vals['queryType']; - } - if (isset($vals['queryAttributes'])) { - $this->queryAttributes = $vals['queryAttributes']; - } - if (isset($vals['queryCounters'])) { - $this->queryCounters = $vals['queryCounters']; - } - if (isset($vals['stageGraph'])) { - $this->stageGraph = $vals['stageGraph']; - } - if (isset($vals['stageList'])) { - $this->stageList = $vals['stageList']; - } - if (isset($vals['done'])) { - $this->done = $vals['done']; - } - if (isset($vals['started'])) { - $this->started = $vals['started']; - } - } - } - - public function getName() { - return 'Query'; - } - - 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->queryId); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->queryType); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::MAP) { - $this->queryAttributes = array(); - $_size89 = 0; - $_ktype90 = 0; - $_vtype91 = 0; - $xfer += $input->readMapBegin($_ktype90, $_vtype91, $_size89); - for ($_i93 = 0; $_i93 < $_size89; ++$_i93) - { - $key94 = ''; - $val95 = ''; - $xfer += $input->readString($key94); - $xfer += $input->readString($val95); - $this->queryAttributes[$key94] = $val95; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::MAP) { - $this->queryCounters = array(); - $_size96 = 0; - $_ktype97 = 0; - $_vtype98 = 0; - $xfer += $input->readMapBegin($_ktype97, $_vtype98, $_size96); - for ($_i100 = 0; $_i100 < $_size96; ++$_i100) - { - $key101 = ''; - $val102 = 0; - $xfer += $input->readString($key101); - $xfer += $input->readI64($val102); - $this->queryCounters[$key101] = $val102; - } - $xfer += $input->readMapEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::STRUCT) { - $this->stageGraph = new Graph(); - $xfer += $this->stageGraph->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::LST) { - $this->stageList = array(); - $_size103 = 0; - $_etype106 = 0; - $xfer += $input->readListBegin($_etype106, $_size103); - for ($_i107 = 0; $_i107 < $_size103; ++$_i107) - { - $elem108 = null; - $elem108 = new Stage(); - $xfer += $elem108->read($input); - $this->stageList []= $elem108; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 7: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->done); - } else { - $xfer += $input->skip($ftype); - } - break; - case 8: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->started); - } 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('Query'); - if ($this->queryId !== null) { - $xfer += $output->writeFieldBegin('queryId', TType::STRING, 1); - $xfer += $output->writeString($this->queryId); - $xfer += $output->writeFieldEnd(); - } - if ($this->queryType !== null) { - $xfer += $output->writeFieldBegin('queryType', TType::STRING, 2); - $xfer += $output->writeString($this->queryType); - $xfer += $output->writeFieldEnd(); - } - if ($this->queryAttributes !== null) { - if (!is_array($this->queryAttributes)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('queryAttributes', TType::MAP, 3); - { - $output->writeMapBegin(TType::STRING, TType::STRING, count($this->queryAttributes)); - { - foreach ($this->queryAttributes as $kiter109 => $viter110) - { - $xfer += $output->writeString($kiter109); - $xfer += $output->writeString($viter110); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->queryCounters !== null) { - if (!is_array($this->queryCounters)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('queryCounters', TType::MAP, 4); - { - $output->writeMapBegin(TType::STRING, TType::I64, count($this->queryCounters)); - { - foreach ($this->queryCounters as $kiter111 => $viter112) - { - $xfer += $output->writeString($kiter111); - $xfer += $output->writeI64($viter112); - } - } - $output->writeMapEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->stageGraph !== null) { - if (!is_object($this->stageGraph)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stageGraph', TType::STRUCT, 5); - $xfer += $this->stageGraph->write($output); - $xfer += $output->writeFieldEnd(); - } - if ($this->stageList !== null) { - if (!is_array($this->stageList)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('stageList', TType::LST, 6); - { - $output->writeListBegin(TType::STRUCT, count($this->stageList)); - { - foreach ($this->stageList as $iter113) - { - $xfer += $iter113->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->done !== null) { - $xfer += $output->writeFieldBegin('done', TType::BOOL, 7); - $xfer += $output->writeBool($this->done); - $xfer += $output->writeFieldEnd(); - } - if ($this->started !== null) { - $xfer += $output->writeFieldBegin('started', TType::BOOL, 8); - $xfer += $output->writeBool($this->started); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class QueryPlan { - static $_TSPEC; - - public $queries = null; - public $done = null; - public $started = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'queries', - 'type' => TType::LST, - 'etype' => TType::STRUCT, - 'elem' => array( - 'type' => TType::STRUCT, - 'class' => 'Query', - ), - ), - 2 => array( - 'var' => 'done', - 'type' => TType::BOOL, - ), - 3 => array( - 'var' => 'started', - 'type' => TType::BOOL, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['queries'])) { - $this->queries = $vals['queries']; - } - if (isset($vals['done'])) { - $this->done = $vals['done']; - } - if (isset($vals['started'])) { - $this->started = $vals['started']; - } - } - } - - public function getName() { - return 'QueryPlan'; - } - - 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::LST) { - $this->queries = array(); - $_size114 = 0; - $_etype117 = 0; - $xfer += $input->readListBegin($_etype117, $_size114); - for ($_i118 = 0; $_i118 < $_size114; ++$_i118) - { - $elem119 = null; - $elem119 = new Query(); - $xfer += $elem119->read($input); - $this->queries []= $elem119; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->done); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::BOOL) { - $xfer += $input->readBool($this->started); - } 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('QueryPlan'); - if ($this->queries !== null) { - if (!is_array($this->queries)) { - throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); - } - $xfer += $output->writeFieldBegin('queries', TType::LST, 1); - { - $output->writeListBegin(TType::STRUCT, count($this->queries)); - { - foreach ($this->queries as $iter120) - { - $xfer += $iter120->write($output); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->done !== null) { - $xfer += $output->writeFieldBegin('done', TType::BOOL, 2); - $xfer += $output->writeBool($this->done); - $xfer += $output->writeFieldEnd(); - } - if ($this->started !== null) { - $xfer += $output->writeFieldBegin('started', TType::BOOL, 3); - $xfer += $output->writeBool($this->started); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -?> diff --git ql/src/gen-py/__init__.py ql/src/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git ql/src/gen-py/queryplan/ttypes.py ql/src/gen-py/queryplan/ttypes.py index 45987a9..c3b165d 100644 --- ql/src/gen-py/queryplan/ttypes.py +++ ql/src/gen-py/queryplan/ttypes.py @@ -7,7 +7,7 @@ from thrift.Thrift import * from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -18,10 +18,30 @@ class AdjacencyType: CONJUNCTIVE = 0 DISJUNCTIVE = 1 + _VALUES_TO_NAMES = { + 0: "CONJUNCTIVE", + 1: "DISJUNCTIVE", + } + + _NAMES_TO_VALUES = { + "CONJUNCTIVE": 0, + "DISJUNCTIVE": 1, + } + class NodeType: OPERATOR = 0 STAGE = 1 + _VALUES_TO_NAMES = { + 0: "OPERATOR", + 1: "STAGE", + } + + _NAMES_TO_VALUES = { + "OPERATOR": 0, + "STAGE": 1, + } + class OperatorType: JOIN = 0 MAPJOIN = 1 @@ -39,12 +59,68 @@ class OperatorType: UDTF = 13 LATERALVIEWJOIN = 14 LATERALVIEWFORWARD = 15 + HASHTABLESINK = 16 + HASHTABLEDUMMY = 17 + + _VALUES_TO_NAMES = { + 0: "JOIN", + 1: "MAPJOIN", + 2: "EXTRACT", + 3: "FILTER", + 4: "FORWARD", + 5: "GROUPBY", + 6: "LIMIT", + 7: "SCRIPT", + 8: "SELECT", + 9: "TABLESCAN", + 10: "FILESINK", + 11: "REDUCESINK", + 12: "UNION", + 13: "UDTF", + 14: "LATERALVIEWJOIN", + 15: "LATERALVIEWFORWARD", + 16: "HASHTABLESINK", + 17: "HASHTABLEDUMMY", + } + + _NAMES_TO_VALUES = { + "JOIN": 0, + "MAPJOIN": 1, + "EXTRACT": 2, + "FILTER": 3, + "FORWARD": 4, + "GROUPBY": 5, + "LIMIT": 6, + "SCRIPT": 7, + "SELECT": 8, + "TABLESCAN": 9, + "FILESINK": 10, + "REDUCESINK": 11, + "UNION": 12, + "UDTF": 13, + "LATERALVIEWJOIN": 14, + "LATERALVIEWFORWARD": 15, + "HASHTABLESINK": 16, + "HASHTABLEDUMMY": 17, + } class TaskType: MAP = 0 REDUCE = 1 OTHER = 2 + _VALUES_TO_NAMES = { + 0: "MAP", + 1: "REDUCE", + 2: "OTHER", + } + + _NAMES_TO_VALUES = { + "MAP": 0, + "REDUCE": 1, + "OTHER": 2, + } + class StageType: CONDITIONAL = 0 COPY = 1 @@ -55,6 +131,34 @@ class StageType: FUNC = 6 MAPREDLOCAL = 7 MOVE = 8 + STATS = 9 + + _VALUES_TO_NAMES = { + 0: "CONDITIONAL", + 1: "COPY", + 2: "DDL", + 3: "MAPRED", + 4: "EXPLAIN", + 5: "FETCH", + 6: "FUNC", + 7: "MAPREDLOCAL", + 8: "MOVE", + 9: "STATS", + } + + _NAMES_TO_VALUES = { + "CONDITIONAL": 0, + "COPY": 1, + "DDL": 2, + "MAPRED": 3, + "EXPLAIN": 4, + "FETCH": 5, + "FUNC": 6, + "MAPREDLOCAL": 7, + "MOVE": 8, + "STATS": 9, + } + class Adjacency: """ @@ -132,6 +236,9 @@ class Adjacency: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -229,6 +336,9 @@ class Graph: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -365,6 +475,9 @@ class Operator: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -535,6 +648,9 @@ class Task: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -692,6 +808,9 @@ class Stage: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -862,6 +981,9 @@ class Query: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -951,6 +1073,9 @@ class QueryPlan: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -962,4 +1087,3 @@ class QueryPlan: def __ne__(self, other): return not (self == other) - diff --git ql/src/gen-rb/queryplan_constants.rb ql/src/gen-rb/queryplan_constants.rb new file mode 100644 index 0000000..e2856ca --- /dev/null +++ ql/src/gen-rb/queryplan_constants.rb @@ -0,0 +1,8 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'queryplan_types' + diff --git ql/src/gen-rb/queryplan_types.rb ql/src/gen-rb/queryplan_types.rb new file mode 100644 index 0000000..e6a2a58 --- /dev/null +++ ql/src/gen-rb/queryplan_types.rb @@ -0,0 +1,256 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + + +module AdjacencyType + CONJUNCTIVE = 0 + DISJUNCTIVE = 1 + VALUE_MAP = {0 => "CONJUNCTIVE", 1 => "DISJUNCTIVE"} + VALID_VALUES = Set.new([CONJUNCTIVE, DISJUNCTIVE]).freeze +end + +module NodeType + OPERATOR = 0 + STAGE = 1 + VALUE_MAP = {0 => "OPERATOR", 1 => "STAGE"} + VALID_VALUES = Set.new([OPERATOR, STAGE]).freeze +end + +module OperatorType + JOIN = 0 + MAPJOIN = 1 + EXTRACT = 2 + FILTER = 3 + FORWARD = 4 + GROUPBY = 5 + LIMIT = 6 + SCRIPT = 7 + SELECT = 8 + TABLESCAN = 9 + FILESINK = 10 + REDUCESINK = 11 + UNION = 12 + UDTF = 13 + LATERALVIEWJOIN = 14 + LATERALVIEWFORWARD = 15 + HASHTABLESINK = 16 + HASHTABLEDUMMY = 17 + VALUE_MAP = {0 => "JOIN", 1 => "MAPJOIN", 2 => "EXTRACT", 3 => "FILTER", 4 => "FORWARD", 5 => "GROUPBY", 6 => "LIMIT", 7 => "SCRIPT", 8 => "SELECT", 9 => "TABLESCAN", 10 => "FILESINK", 11 => "REDUCESINK", 12 => "UNION", 13 => "UDTF", 14 => "LATERALVIEWJOIN", 15 => "LATERALVIEWFORWARD", 16 => "HASHTABLESINK", 17 => "HASHTABLEDUMMY"} + VALID_VALUES = Set.new([JOIN, MAPJOIN, EXTRACT, FILTER, FORWARD, GROUPBY, LIMIT, SCRIPT, SELECT, TABLESCAN, FILESINK, REDUCESINK, UNION, UDTF, LATERALVIEWJOIN, LATERALVIEWFORWARD, HASHTABLESINK, HASHTABLEDUMMY]).freeze +end + +module TaskType + MAP = 0 + REDUCE = 1 + OTHER = 2 + VALUE_MAP = {0 => "MAP", 1 => "REDUCE", 2 => "OTHER"} + VALID_VALUES = Set.new([MAP, REDUCE, OTHER]).freeze +end + +module StageType + CONDITIONAL = 0 + COPY = 1 + DDL = 2 + MAPRED = 3 + EXPLAIN = 4 + FETCH = 5 + FUNC = 6 + MAPREDLOCAL = 7 + MOVE = 8 + STATS = 9 + VALUE_MAP = {0 => "CONDITIONAL", 1 => "COPY", 2 => "DDL", 3 => "MAPRED", 4 => "EXPLAIN", 5 => "FETCH", 6 => "FUNC", 7 => "MAPREDLOCAL", 8 => "MOVE", 9 => "STATS"} + VALID_VALUES = Set.new([CONDITIONAL, COPY, DDL, MAPRED, EXPLAIN, FETCH, FUNC, MAPREDLOCAL, MOVE, STATS]).freeze +end + +class Adjacency + include ::Thrift::Struct, ::Thrift::Struct_Union + NODE = 1 + CHILDREN = 2 + ADJACENCYTYPE = 3 + + FIELDS = { + NODE => {:type => ::Thrift::Types::STRING, :name => 'node'}, + CHILDREN => {:type => ::Thrift::Types::LIST, :name => 'children', :element => {:type => ::Thrift::Types::STRING}}, + ADJACENCYTYPE => {:type => ::Thrift::Types::I32, :name => 'adjacencyType', :enum_class => AdjacencyType} + } + + def struct_fields; FIELDS; end + + def validate + unless @adjacencyType.nil? || AdjacencyType::VALID_VALUES.include?(@adjacencyType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field adjacencyType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Graph + include ::Thrift::Struct, ::Thrift::Struct_Union + NODETYPE = 1 + ROOTS = 2 + ADJACENCYLIST = 3 + + FIELDS = { + NODETYPE => {:type => ::Thrift::Types::I32, :name => 'nodeType', :enum_class => NodeType}, + ROOTS => {:type => ::Thrift::Types::LIST, :name => 'roots', :element => {:type => ::Thrift::Types::STRING}}, + ADJACENCYLIST => {:type => ::Thrift::Types::LIST, :name => 'adjacencyList', :element => {:type => ::Thrift::Types::STRUCT, :class => Adjacency}} + } + + def struct_fields; FIELDS; end + + def validate + unless @nodeType.nil? || NodeType::VALID_VALUES.include?(@nodeType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field nodeType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Operator + include ::Thrift::Struct, ::Thrift::Struct_Union + OPERATORID = 1 + OPERATORTYPE = 2 + OPERATORATTRIBUTES = 3 + OPERATORCOUNTERS = 4 + DONE = 5 + STARTED = 6 + + FIELDS = { + OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'}, + OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => OperatorType}, + OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @operatorType.nil? || OperatorType::VALID_VALUES.include?(@operatorType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Task + include ::Thrift::Struct, ::Thrift::Struct_Union + TASKID = 1 + TASKTYPE = 2 + TASKATTRIBUTES = 3 + TASKCOUNTERS = 4 + OPERATORGRAPH = 5 + OPERATORLIST = 6 + DONE = 7 + STARTED = 8 + + FIELDS = { + TASKID => {:type => ::Thrift::Types::STRING, :name => 'taskId'}, + TASKTYPE => {:type => ::Thrift::Types::I32, :name => 'taskType', :enum_class => TaskType}, + TASKATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'taskAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + TASKCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'taskCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + OPERATORGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'operatorGraph', :class => Graph, :optional => true}, + OPERATORLIST => {:type => ::Thrift::Types::LIST, :name => 'operatorList', :element => {:type => ::Thrift::Types::STRUCT, :class => Operator}, :optional => true}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @taskType.nil? || TaskType::VALID_VALUES.include?(@taskType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field taskType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Stage + include ::Thrift::Struct, ::Thrift::Struct_Union + STAGEID = 1 + STAGETYPE = 2 + STAGEATTRIBUTES = 3 + STAGECOUNTERS = 4 + TASKLIST = 5 + DONE = 6 + STARTED = 7 + + FIELDS = { + STAGEID => {:type => ::Thrift::Types::STRING, :name => 'stageId'}, + STAGETYPE => {:type => ::Thrift::Types::I32, :name => 'stageType', :enum_class => StageType}, + STAGEATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'stageAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + STAGECOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'stageCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + TASKLIST => {:type => ::Thrift::Types::LIST, :name => 'taskList', :element => {:type => ::Thrift::Types::STRUCT, :class => Task}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + unless @stageType.nil? || StageType::VALID_VALUES.include?(@stageType) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field stageType!') + end + end + + ::Thrift::Struct.generate_accessors self +end + +class Query + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERYID = 1 + QUERYTYPE = 2 + QUERYATTRIBUTES = 3 + QUERYCOUNTERS = 4 + STAGEGRAPH = 5 + STAGELIST = 6 + DONE = 7 + STARTED = 8 + + FIELDS = { + QUERYID => {:type => ::Thrift::Types::STRING, :name => 'queryId'}, + QUERYTYPE => {:type => ::Thrift::Types::STRING, :name => 'queryType'}, + QUERYATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'queryAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}, + QUERYCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'queryCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}}, + STAGEGRAPH => {:type => ::Thrift::Types::STRUCT, :name => 'stageGraph', :class => Graph}, + STAGELIST => {:type => ::Thrift::Types::LIST, :name => 'stageList', :element => {:type => ::Thrift::Types::STRUCT, :class => Stage}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + +class QueryPlan + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERIES = 1 + DONE = 2 + STARTED = 3 + + FIELDS = { + QUERIES => {:type => ::Thrift::Types::LIST, :name => 'queries', :element => {:type => ::Thrift::Types::STRUCT, :class => Query}}, + DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'}, + STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self +end + diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java index 5ccb909..52d14ae 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java @@ -132,7 +132,7 @@ public abstract class AbstractMapJoinOperator extends Co } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java index 7daea2d..aa45b7d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CollectOperator.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.CollectDesc; import org.apache.hadoop.hive.serde2.objectinspector.InspectableObject; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -78,7 +79,7 @@ public class CollectOperator extends Operator implements } @Override - public int getType() { - return -1; + public OperatorType getType() { + return null; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java index bf7b7a5..90589ed 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java @@ -172,7 +172,7 @@ public class ConditionalTask extends Task implements Serializab } @Override - public int getType() { + public StageType getType() { return StageType.CONDITIONAL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java index 46b8bf4..30ea670 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/CopyTask.java @@ -90,7 +90,7 @@ public class CopyTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.COPY; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java index 0a9cdf4..55dcd90 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -2624,7 +2624,7 @@ public class DDLTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.DDL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java index af6e0af..0f954ed 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java @@ -1262,7 +1262,7 @@ public class ExecDriver extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.MAPRED; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java index a572bcb..9e0d48e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java @@ -407,7 +407,7 @@ public class ExplainTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.EXPLAIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java index 7bf8886..5257463 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExtractOperator.java @@ -46,7 +46,7 @@ public class ExtractOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.EXTRACT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java index de2c42d..5987a3c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java @@ -151,7 +151,7 @@ public class FetchTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.FETCH; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java index d510f95..ba1a9b1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java @@ -759,7 +759,7 @@ public class FileSinkOperator extends TerminalOperator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FILESINK; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java index 554bf25..44e0e31 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FilterOperator.java @@ -108,7 +108,7 @@ public class FilterOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FILTER; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java index 2a35c96..4c15f69 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ForwardOperator.java @@ -37,7 +37,7 @@ public class ForwardOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.FORWARD; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java index 1e6941e..225c5c7 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java @@ -120,7 +120,7 @@ public class FunctionTask extends Task { } @Override - public int getType() { + public StageType getType() { return StageType.FUNC; } @@ -133,4 +133,4 @@ public class FunctionTask extends Task { protected void localizeMRTmpFilesImpl(Context ctx) { throw new RuntimeException ("Unexpected call"); } -} \ No newline at end of file +} diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java index 8423178..e5de8d1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java @@ -1039,7 +1039,7 @@ public class GroupByOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.GROUPBY; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java index 87fc61c..57ae5fc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableDummyOperator.java @@ -58,7 +58,7 @@ public class HashTableDummyOperator extends Operator impleme } @Override - public int getType() { + public OperatorType getType() { return OperatorType.HASHTABLEDUMMY; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java index 9fe35ec..f2d3d8f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/HashTableSinkOperator.java @@ -442,10 +442,7 @@ public class HashTableSinkOperator extends TerminalOperator i } @Override - public int getType() { + public OperatorType getType() { return OperatorType.HASHTABLESINK; } - - - } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java index e16df36..b9714cc 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java @@ -133,7 +133,7 @@ public class JoinOperator extends CommonJoinOperator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.JOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java index c070aca..5bfb805 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewForwardOperator.java @@ -43,7 +43,7 @@ public class LateralViewForwardOperator extends Operator } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LATERALVIEWFORWARD; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java index 5eb9098..f5c42ef 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LateralViewJoinOperator.java @@ -143,7 +143,7 @@ public class LateralViewJoinOperator extends Operator { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LATERALVIEWJOIN; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java index da5dbb9..b1958a5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/LimitOperator.java @@ -57,7 +57,7 @@ public class LimitOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.LIMIT; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java index 98571dd..0f6f9de 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java @@ -317,7 +317,7 @@ public class MapJoinOperator extends AbstractMapJoinOperator implem } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java index 887ad30..3b7d5c1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapOperator.java @@ -34,6 +34,7 @@ import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.io.IOContext; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.metadata.VirtualColumn; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.MapredWork; import org.apache.hadoop.hive.ql.plan.PartitionDesc; import org.apache.hadoop.hive.ql.plan.TableScanDesc; @@ -519,8 +520,8 @@ public class MapOperator extends Operator implements Serializable { } @Override - public int getType() { - return -1; + public OperatorType getType() { + return null; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java index 0fab63c..54ec1e9 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java @@ -38,6 +38,7 @@ import org.apache.hadoop.hive.ql.DriverContext; import org.apache.hadoop.hive.ql.exec.Utilities.StreamPrinter; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.plan.MapredWork; +import org.apache.hadoop.hive.ql.plan.api.StageType; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.mapred.JobConf; @@ -410,6 +411,8 @@ public class MapRedTask extends ExecDriver implements Serializable { return null; } - - + @Override + public StageType getType() { + return StageType.MAPREDLOCAL; + } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java index c5aa3d6..89a36c3 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapredLocalTask.java @@ -402,8 +402,8 @@ public class MapredLocalTask extends Task implements Serializab } @Override - public int getType() { - // assert false; + public StageType getType() { + //assert false; return StageType.MAPREDLOCAL; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 7fbc586..d19b1db 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -283,7 +283,7 @@ public class MoveTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.MOVE; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java index 6c6ea89..dc3ea1e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java @@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.metadata.HiveException; import org.apache.hadoop.hive.ql.parse.SemanticException; +import org.apache.hadoop.hive.ql.plan.api.OperatorType; import org.apache.hadoop.hive.ql.plan.Explain; import org.apache.hadoop.hive.ql.plan.ExprNodeDesc; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; @@ -1204,7 +1205,7 @@ public abstract class Operator implements Serializable, * * @return OperatorType.* */ - abstract public int getType(); + abstract public OperatorType getType(); public void setGroupKeyObject(Object keyObject) { this.groupKeyObject = keyObject; diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java index 592f4f7..2685820 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java @@ -314,7 +314,7 @@ public class ReduceSinkOperator extends TerminalOperator } @Override - public int getType() { + public OperatorType getType() { return OperatorType.REDUCESINK; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java index 001d1f0..9c52deb 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java @@ -588,7 +588,7 @@ public class SMBMapJoinOperator extends AbstractMapJoinOperator imp } @Override - public int getType() { + public OperatorType getType() { return OperatorType.MAPJOIN; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java index 4f8b4bd..aec5fca 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java @@ -662,7 +662,7 @@ public class ScriptOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.SCRIPT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java index d644a33..3582e78 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SelectOperator.java @@ -93,7 +93,7 @@ public class SelectOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.SELECT; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java index 47adbed..b818dc5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/StatsTask.java @@ -211,7 +211,7 @@ public class StatsTask extends Task implements Serializable { } @Override - public int getType() { + public StageType getType() { return StageType.STATS; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java index 96e63b8..6ba7a9d 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java @@ -181,7 +181,7 @@ public class TableScanOperator extends Operator implements } @Override - public int getType() { + public OperatorType getType() { return OperatorType.TABLESCAN; } 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 893530c..0aa5086 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java @@ -34,6 +34,7 @@ import org.apache.hadoop.hive.ql.QueryPlan; import org.apache.hadoop.hive.ql.lib.Node; import org.apache.hadoop.hive.ql.metadata.Hive; import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.plan.api.StageType; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.ql.session.SessionState.LogHelper; import org.apache.hadoop.util.StringUtils; @@ -346,9 +347,9 @@ public abstract class Task implements Serializable, Node * * @return TaskTypeType.* or -1 if not overridden */ - public int getType() { + public StageType getType() { assert false; - return -1; + return null; } /** diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java index 682f38a..919656c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/UDTFOperator.java @@ -118,7 +118,7 @@ public class UDTFOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.UDTF; } diff --git ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java index 2c42ed7..2462517 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/UnionOperator.java @@ -141,7 +141,7 @@ public class UnionOperator extends Operator implements Serializable { } @Override - public int getType() { + public OperatorType getType() { return OperatorType.UNION; } } diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java index 0d60507..1f01446 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/CompactIndexHandler.java @@ -57,7 +57,7 @@ public class CompactIndexHandler extends AbstractIndexHandler { Table indexTable) throws HiveException { StorageDescriptor storageDesc = index.getSd(); if (this.usesIndexTable() && indexTable != null) { - StorageDescriptor indexTableSd = storageDesc.clone(); + StorageDescriptor indexTableSd = storageDesc.deepCopy(); List indexTblCols = indexTableSd.getCols(); FieldSchema bucketFileName = new FieldSchema("_bucketname", "string", ""); indexTblCols.add(bucketFileName); diff --git ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java index 734bd72..eac168f 100644 --- ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java @@ -96,7 +96,7 @@ public class IndexMetadataChangeTask extends Task{ } @Override - public int getType() { + public StageType getType() { return StageType.DDL; } 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 c5fb22b..342e39a 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java @@ -492,7 +492,7 @@ public class Hive { } } - org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().clone(); + org.apache.hadoop.hive.metastore.api.StorageDescriptor storageDescriptor = baseTbl.getSd().deepCopy(); SerDeInfo serdeInfo = storageDescriptor.getSerdeInfo(); if(serde != null) { serdeInfo.setSerializationLib(serde); diff --git ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java index 7167196..c85d528 100644 --- ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java +++ ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java @@ -730,7 +730,7 @@ public class Table implements Serializable { } public Table copy() throws HiveException { - return new Table(tTable.clone()); + return new Table(tTable.deepCopy()); } public void setCreateTime(int createTime) { diff --git serde/build.xml serde/build.xml index b64b142..65c307d 100644 --- serde/build.xml +++ serde/build.xml @@ -30,7 +30,6 @@ to call at top-level: ant deploy-contrib compile-core-test - - + @@ -56,18 +55,18 @@ to call at top-level: ant deploy-contrib compile-core-test - - Executing thrift (which needs to be in your path) to build java serde Constants... - - + + Executing ${thrift.home}/bin/thrift to build java serde Constants... + + - Executing thrift (which needs to be in your path) to build complex.thrift test classes... - - + Executing ${thrift.home}/bin/thrift to build complex.thrift test classes... + + - Executing thrift (which needs to be in your path) to build testthrift.thrift classes... + Executing ${thrift.home}/bin/thrift to build testthrift.thrift classes... - + diff --git serde/ivy.xml serde/ivy.xml index da69342..2b38da4 100644 --- serde/ivy.xml +++ serde/ivy.xml @@ -1,8 +1,26 @@ + - + + + diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java deleted file mode 100644 index d52c0ad..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java +++ /dev/null @@ -1,105 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -public class Constants { - - public static final String SERIALIZATION_LIB = "serialization.lib"; - - public static final String SERIALIZATION_CLASS = "serialization.class"; - - public static final String SERIALIZATION_FORMAT = "serialization.format"; - - public static final String SERIALIZATION_DDL = "serialization.ddl"; - - public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; - - public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; - - public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; - - public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; - - public static final String FIELD_DELIM = "field.delim"; - - public static final String COLLECTION_DELIM = "colelction.delim"; - - public static final String LINE_DELIM = "line.delim"; - - public static final String MAPKEY_DELIM = "mapkey.delim"; - - public static final String QUOTE_CHAR = "quote.delim"; - - public static final String ESCAPE_CHAR = "escape.delim"; - - public static final String VOID_TYPE_NAME = "void"; - - public static final String BOOLEAN_TYPE_NAME = "boolean"; - - public static final String TINYINT_TYPE_NAME = "tinyint"; - - public static final String SMALLINT_TYPE_NAME = "smallint"; - - public static final String INT_TYPE_NAME = "int"; - - public static final String BIGINT_TYPE_NAME = "bigint"; - - public static final String FLOAT_TYPE_NAME = "float"; - - public static final String DOUBLE_TYPE_NAME = "double"; - - public static final String STRING_TYPE_NAME = "string"; - - public static final String DATE_TYPE_NAME = "date"; - - public static final String DATETIME_TYPE_NAME = "datetime"; - - public static final String TIMESTAMP_TYPE_NAME = "timestamp"; - - public static final String LIST_TYPE_NAME = "array"; - - public static final String MAP_TYPE_NAME = "map"; - - public static final String STRUCT_TYPE_NAME = "struct"; - - public static final String UNION_TYPE_NAME = "uniontype"; - - public static final String LIST_COLUMNS = "columns"; - - public static final String LIST_COLUMN_TYPES = "columns.types"; - - public static final Set PrimitiveTypes = new HashSet(); - static { - PrimitiveTypes.add("void"); - PrimitiveTypes.add("boolean"); - PrimitiveTypes.add("tinyint"); - PrimitiveTypes.add("smallint"); - PrimitiveTypes.add("int"); - PrimitiveTypes.add("bigint"); - PrimitiveTypes.add("float"); - PrimitiveTypes.add("double"); - PrimitiveTypes.add("string"); - PrimitiveTypes.add("date"); - PrimitiveTypes.add("datetime"); - PrimitiveTypes.add("timestamp"); - } - - public static final Set CollectionTypes = new HashSet(); - static { - CollectionTypes.add("array"); - CollectionTypes.add("map"); - } - -} diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/dynamic_type/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/Constants.java deleted file mode 100644 index e69de29..0000000 diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java deleted file mode 100644 index 325f30a..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java +++ /dev/null @@ -1,214 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class InnerStruct implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("InnerStruct"); - private static final TField FIELD0_FIELD_DESC = new TField("field0", TType.I32, (short)1); - - public int field0; - public static final int FIELD0 = 1; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean field0 = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD0, new FieldMetaData("field0", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); - } - - public InnerStruct() { - } - - public InnerStruct( - int field0) - { - this(); - this.field0 = field0; - this.__isset.field0 = true; - } - - /** - * Performs a deep copy on other. - */ - public InnerStruct(InnerStruct other) { - __isset.field0 = other.__isset.field0; - this.field0 = other.field0; - } - - @Override - public InnerStruct clone() { - return new InnerStruct(this); - } - - public int getField0() { - return this.field0; - } - - public void setField0(int field0) { - this.field0 = field0; - this.__isset.field0 = true; - } - - public void unsetField0() { - this.__isset.field0 = false; - } - - // Returns true if field field0 is set (has been asigned a value) and false otherwise - public boolean isSetField0() { - return this.__isset.field0; - } - - public void setField0IsSet(boolean value) { - this.__isset.field0 = value; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case FIELD0: - if (value == null) { - unsetField0(); - } else { - setField0((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELD0: - return new Integer(getField0()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELD0: - return isSetField0(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof InnerStruct) - return this.equals((InnerStruct)that); - return false; - } - - public boolean equals(InnerStruct that) { - if (that == null) - return false; - - boolean this_present_field0 = true; - boolean that_present_field0 = true; - if (this_present_field0 || that_present_field0) { - if (!(this_present_field0 && that_present_field0)) - return false; - if (this.field0 != that.field0) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case FIELD0: - if (field.type == TType.I32) { - this.field0 = iprot.readI32(); - this.__isset.field0 = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD0_FIELD_DESC); - oprot.writeI32(this.field0); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("InnerStruct("); - boolean first = true; - - sb.append("field0:"); - sb.append(this.field0); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java deleted file mode 100644 index 3f4efbe..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java +++ /dev/null @@ -1,401 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ThriftTestObj"); - private static final TField FIELD1_FIELD_DESC = new TField("field1", TType.I32, (short)1); - private static final TField FIELD2_FIELD_DESC = new TField("field2", TType.STRING, (short)2); - private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.LIST, (short)3); - - public int field1; - public static final int FIELD1 = 1; - public String field2; - public static final int FIELD2 = 2; - public List field3; - public static final int FIELD3 = 3; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean field1 = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, InnerStruct.class)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); - } - - public ThriftTestObj() { - } - - public ThriftTestObj( - int field1, - String field2, - List field3) - { - this(); - this.field1 = field1; - this.__isset.field1 = true; - this.field2 = field2; - this.field3 = field3; - } - - /** - * Performs a deep copy on other. - */ - public ThriftTestObj(ThriftTestObj other) { - __isset.field1 = other.__isset.field1; - this.field1 = other.field1; - if (other.isSetField2()) { - this.field2 = other.field2; - } - if (other.isSetField3()) { - List __this__field3 = new ArrayList(); - for (InnerStruct other_element : other.field3) { - __this__field3.add(new InnerStruct(other_element)); - } - this.field3 = __this__field3; - } - } - - @Override - public ThriftTestObj clone() { - return new ThriftTestObj(this); - } - - public int getField1() { - return this.field1; - } - - public void setField1(int field1) { - this.field1 = field1; - this.__isset.field1 = true; - } - - public void unsetField1() { - this.__isset.field1 = false; - } - - // Returns true if field field1 is set (has been asigned a value) and false otherwise - public boolean isSetField1() { - return this.__isset.field1; - } - - public void setField1IsSet(boolean value) { - this.__isset.field1 = value; - } - - public String getField2() { - return this.field2; - } - - public void setField2(String field2) { - this.field2 = field2; - } - - public void unsetField2() { - this.field2 = null; - } - - // Returns true if field field2 is set (has been asigned a value) and false otherwise - public boolean isSetField2() { - return this.field2 != null; - } - - public void setField2IsSet(boolean value) { - if (!value) { - this.field2 = null; - } - } - - public int getField3Size() { - return (this.field3 == null) ? 0 : this.field3.size(); - } - - public java.util.Iterator getField3Iterator() { - return (this.field3 == null) ? null : this.field3.iterator(); - } - - public void addToField3(InnerStruct elem) { - if (this.field3 == null) { - this.field3 = new ArrayList(); - } - this.field3.add(elem); - } - - public List getField3() { - return this.field3; - } - - public void setField3(List field3) { - this.field3 = field3; - } - - public void unsetField3() { - this.field3 = null; - } - - // Returns true if field field3 is set (has been asigned a value) and false otherwise - public boolean isSetField3() { - return this.field3 != null; - } - - public void setField3IsSet(boolean value) { - if (!value) { - this.field3 = null; - } - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case FIELD1: - if (value == null) { - unsetField1(); - } else { - setField1((Integer)value); - } - break; - - case FIELD2: - if (value == null) { - unsetField2(); - } else { - setField2((String)value); - } - break; - - case FIELD3: - if (value == null) { - unsetField3(); - } else { - setField3((List)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case FIELD1: - return new Integer(getField1()); - - case FIELD2: - return getField2(); - - case FIELD3: - return getField3(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case FIELD1: - return isSetField1(); - case FIELD2: - return isSetField2(); - case FIELD3: - return isSetField3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof ThriftTestObj) - return this.equals((ThriftTestObj)that); - return false; - } - - public boolean equals(ThriftTestObj that) { - if (that == null) - return false; - - boolean this_present_field1 = true; - boolean that_present_field1 = true; - if (this_present_field1 || that_present_field1) { - if (!(this_present_field1 && that_present_field1)) - return false; - if (this.field1 != that.field1) - return false; - } - - boolean this_present_field2 = true && this.isSetField2(); - boolean that_present_field2 = true && that.isSetField2(); - if (this_present_field2 || that_present_field2) { - if (!(this_present_field2 && that_present_field2)) - return false; - if (!this.field2.equals(that.field2)) - return false; - } - - boolean this_present_field3 = true && this.isSetField3(); - boolean that_present_field3 = true && that.isSetField3(); - if (this_present_field3 || that_present_field3) { - if (!(this_present_field3 && that_present_field3)) - return false; - if (!this.field3.equals(that.field3)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case FIELD1: - if (field.type == TType.I32) { - this.field1 = iprot.readI32(); - this.__isset.field1 = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FIELD2: - if (field.type == TType.STRING) { - this.field2 = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case FIELD3: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.field3 = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - InnerStruct _elem2; - _elem2 = new InnerStruct(); - _elem2.read(iprot); - this.field3.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(FIELD1_FIELD_DESC); - oprot.writeI32(this.field1); - oprot.writeFieldEnd(); - if (this.field2 != null) { - oprot.writeFieldBegin(FIELD2_FIELD_DESC); - oprot.writeString(this.field2); - oprot.writeFieldEnd(); - } - if (this.field3 != null) { - oprot.writeFieldBegin(FIELD3_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); - for (InnerStruct _iter3 : this.field3) { - _iter3.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("ThriftTestObj("); - boolean first = true; - - sb.append("field1:"); - sb.append(this.field1); - first = false; - if (!first) sb.append(", "); - sb.append("field2:"); - if (this.field2 == null) { - sb.append("null"); - } else { - sb.append(this.field2); - } - first = false; - if (!first) sb.append(", "); - sb.append("field3:"); - if (this.field3 == null) { - sb.append("null"); - } else { - sb.append(this.field3); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/dynamic_type/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java deleted file mode 100644 index ece9305..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java +++ /dev/null @@ -1,742 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class Complex implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("Complex"); - private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1); - private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2); - private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3); - private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4); - private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5); - private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6); - - public int aint; - public static final int AINT = 1; - public String aString; - public static final int ASTRING = 2; - public List lint; - public static final int LINT = 3; - public List lString; - public static final int LSTRING = 4; - public List lintString; - public static final int LINTSTRING = 5; - public Map mStringString; - public static final int MSTRINGSTRING = 6; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean aint = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(ASTRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.I32)))); - put(LSTRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - put(LINTSTRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, IntString.class)))); - put(MSTRINGSTRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); - } - - public Complex() { - } - - public Complex( - int aint, - String aString, - List lint, - List lString, - List lintString, - Map mStringString) - { - this(); - this.aint = aint; - this.__isset.aint = true; - this.aString = aString; - this.lint = lint; - this.lString = lString; - this.lintString = lintString; - this.mStringString = mStringString; - } - - /** - * Performs a deep copy on other. - */ - public Complex(Complex other) { - __isset.aint = other.__isset.aint; - this.aint = other.aint; - if (other.isSetAString()) { - this.aString = other.aString; - } - if (other.isSetLint()) { - List __this__lint = new ArrayList(); - for (Integer other_element : other.lint) { - __this__lint.add(other_element); - } - this.lint = __this__lint; - } - if (other.isSetLString()) { - List __this__lString = new ArrayList(); - for (String other_element : other.lString) { - __this__lString.add(other_element); - } - this.lString = __this__lString; - } - if (other.isSetLintString()) { - List __this__lintString = new ArrayList(); - for (IntString other_element : other.lintString) { - __this__lintString.add(new IntString(other_element)); - } - this.lintString = __this__lintString; - } - if (other.isSetMStringString()) { - Map __this__mStringString = new HashMap(); - for (Map.Entry other_element : other.mStringString.entrySet()) { - - String other_element_key = other_element.getKey(); - String other_element_value = other_element.getValue(); - - String __this__mStringString_copy_key = other_element_key; - - String __this__mStringString_copy_value = other_element_value; - - __this__mStringString.put(__this__mStringString_copy_key, __this__mStringString_copy_value); - } - this.mStringString = __this__mStringString; - } - } - - @Override - public Complex clone() { - return new Complex(this); - } - - public int getAint() { - return this.aint; - } - - public void setAint(int aint) { - this.aint = aint; - this.__isset.aint = true; - } - - public void unsetAint() { - this.__isset.aint = false; - } - - // Returns true if field aint is set (has been asigned a value) and false otherwise - public boolean isSetAint() { - return this.__isset.aint; - } - - public void setAintIsSet(boolean value) { - this.__isset.aint = value; - } - - public String getAString() { - return this.aString; - } - - public void setAString(String aString) { - this.aString = aString; - } - - public void unsetAString() { - this.aString = null; - } - - // Returns true if field aString is set (has been asigned a value) and false otherwise - public boolean isSetAString() { - return this.aString != null; - } - - public void setAStringIsSet(boolean value) { - if (!value) { - this.aString = null; - } - } - - public int getLintSize() { - return (this.lint == null) ? 0 : this.lint.size(); - } - - public java.util.Iterator getLintIterator() { - return (this.lint == null) ? null : this.lint.iterator(); - } - - public void addToLint(int elem) { - if (this.lint == null) { - this.lint = new ArrayList(); - } - this.lint.add(elem); - } - - public List getLint() { - return this.lint; - } - - public void setLint(List lint) { - this.lint = lint; - } - - public void unsetLint() { - this.lint = null; - } - - // Returns true if field lint is set (has been asigned a value) and false otherwise - public boolean isSetLint() { - return this.lint != null; - } - - public void setLintIsSet(boolean value) { - if (!value) { - this.lint = null; - } - } - - public int getLStringSize() { - return (this.lString == null) ? 0 : this.lString.size(); - } - - public java.util.Iterator getLStringIterator() { - return (this.lString == null) ? null : this.lString.iterator(); - } - - public void addToLString(String elem) { - if (this.lString == null) { - this.lString = new ArrayList(); - } - this.lString.add(elem); - } - - public List getLString() { - return this.lString; - } - - public void setLString(List lString) { - this.lString = lString; - } - - public void unsetLString() { - this.lString = null; - } - - // Returns true if field lString is set (has been asigned a value) and false otherwise - public boolean isSetLString() { - return this.lString != null; - } - - public void setLStringIsSet(boolean value) { - if (!value) { - this.lString = null; - } - } - - public int getLintStringSize() { - return (this.lintString == null) ? 0 : this.lintString.size(); - } - - public java.util.Iterator getLintStringIterator() { - return (this.lintString == null) ? null : this.lintString.iterator(); - } - - public void addToLintString(IntString elem) { - if (this.lintString == null) { - this.lintString = new ArrayList(); - } - this.lintString.add(elem); - } - - public List getLintString() { - return this.lintString; - } - - public void setLintString(List lintString) { - this.lintString = lintString; - } - - public void unsetLintString() { - this.lintString = null; - } - - // Returns true if field lintString is set (has been asigned a value) and false otherwise - public boolean isSetLintString() { - return this.lintString != null; - } - - public void setLintStringIsSet(boolean value) { - if (!value) { - this.lintString = null; - } - } - - public int getMStringStringSize() { - return (this.mStringString == null) ? 0 : this.mStringString.size(); - } - - public void putToMStringString(String key, String val) { - if (this.mStringString == null) { - this.mStringString = new HashMap(); - } - this.mStringString.put(key, val); - } - - public Map getMStringString() { - return this.mStringString; - } - - public void setMStringString(Map mStringString) { - this.mStringString = mStringString; - } - - public void unsetMStringString() { - this.mStringString = null; - } - - // Returns true if field mStringString is set (has been asigned a value) and false otherwise - public boolean isSetMStringString() { - return this.mStringString != null; - } - - public void setMStringStringIsSet(boolean value) { - if (!value) { - this.mStringString = null; - } - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case AINT: - if (value == null) { - unsetAint(); - } else { - setAint((Integer)value); - } - break; - - case ASTRING: - if (value == null) { - unsetAString(); - } else { - setAString((String)value); - } - break; - - case LINT: - if (value == null) { - unsetLint(); - } else { - setLint((List)value); - } - break; - - case LSTRING: - if (value == null) { - unsetLString(); - } else { - setLString((List)value); - } - break; - - case LINTSTRING: - if (value == null) { - unsetLintString(); - } else { - setLintString((List)value); - } - break; - - case MSTRINGSTRING: - if (value == null) { - unsetMStringString(); - } else { - setMStringString((Map)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case AINT: - return new Integer(getAint()); - - case ASTRING: - return getAString(); - - case LINT: - return getLint(); - - case LSTRING: - return getLString(); - - case LINTSTRING: - return getLintString(); - - case MSTRINGSTRING: - return getMStringString(); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case AINT: - return isSetAint(); - case ASTRING: - return isSetAString(); - case LINT: - return isSetLint(); - case LSTRING: - return isSetLString(); - case LINTSTRING: - return isSetLintString(); - case MSTRINGSTRING: - return isSetMStringString(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof Complex) - return this.equals((Complex)that); - return false; - } - - public boolean equals(Complex that) { - if (that == null) - return false; - - boolean this_present_aint = true; - boolean that_present_aint = true; - if (this_present_aint || that_present_aint) { - if (!(this_present_aint && that_present_aint)) - return false; - if (this.aint != that.aint) - return false; - } - - boolean this_present_aString = true && this.isSetAString(); - boolean that_present_aString = true && that.isSetAString(); - if (this_present_aString || that_present_aString) { - if (!(this_present_aString && that_present_aString)) - return false; - if (!this.aString.equals(that.aString)) - return false; - } - - boolean this_present_lint = true && this.isSetLint(); - boolean that_present_lint = true && that.isSetLint(); - if (this_present_lint || that_present_lint) { - if (!(this_present_lint && that_present_lint)) - return false; - if (!this.lint.equals(that.lint)) - return false; - } - - boolean this_present_lString = true && this.isSetLString(); - boolean that_present_lString = true && that.isSetLString(); - if (this_present_lString || that_present_lString) { - if (!(this_present_lString && that_present_lString)) - return false; - if (!this.lString.equals(that.lString)) - return false; - } - - boolean this_present_lintString = true && this.isSetLintString(); - boolean that_present_lintString = true && that.isSetLintString(); - if (this_present_lintString || that_present_lintString) { - if (!(this_present_lintString && that_present_lintString)) - return false; - if (!this.lintString.equals(that.lintString)) - return false; - } - - boolean this_present_mStringString = true && this.isSetMStringString(); - boolean that_present_mStringString = true && that.isSetMStringString(); - if (this_present_mStringString || that_present_mStringString) { - if (!(this_present_mStringString && that_present_mStringString)) - return false; - if (!this.mStringString.equals(that.mStringString)) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case AINT: - if (field.type == TType.I32) { - this.aint = iprot.readI32(); - this.__isset.aint = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case ASTRING: - if (field.type == TType.STRING) { - this.aString = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LINT: - if (field.type == TType.LIST) { - { - TList _list0 = iprot.readListBegin(); - this.lint = new ArrayList(_list0.size); - for (int _i1 = 0; _i1 < _list0.size; ++_i1) - { - int _elem2; - _elem2 = iprot.readI32(); - this.lint.add(_elem2); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LSTRING: - if (field.type == TType.LIST) { - { - TList _list3 = iprot.readListBegin(); - this.lString = new ArrayList(_list3.size); - for (int _i4 = 0; _i4 < _list3.size; ++_i4) - { - String _elem5; - _elem5 = iprot.readString(); - this.lString.add(_elem5); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case LINTSTRING: - if (field.type == TType.LIST) { - { - TList _list6 = iprot.readListBegin(); - this.lintString = new ArrayList(_list6.size); - for (int _i7 = 0; _i7 < _list6.size; ++_i7) - { - IntString _elem8; - _elem8 = new IntString(); - _elem8.read(iprot); - this.lintString.add(_elem8); - } - iprot.readListEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MSTRINGSTRING: - if (field.type == TType.MAP) { - { - TMap _map9 = iprot.readMapBegin(); - this.mStringString = new HashMap(2*_map9.size); - for (int _i10 = 0; _i10 < _map9.size; ++_i10) - { - String _key11; - String _val12; - _key11 = iprot.readString(); - _val12 = iprot.readString(); - this.mStringString.put(_key11, _val12); - } - iprot.readMapEnd(); - } - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(AINT_FIELD_DESC); - oprot.writeI32(this.aint); - oprot.writeFieldEnd(); - if (this.aString != null) { - oprot.writeFieldBegin(A_STRING_FIELD_DESC); - oprot.writeString(this.aString); - oprot.writeFieldEnd(); - } - if (this.lint != null) { - oprot.writeFieldBegin(LINT_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.I32, this.lint.size())); - for (int _iter13 : this.lint) { - oprot.writeI32(_iter13); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lString != null) { - oprot.writeFieldBegin(L_STRING_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRING, this.lString.size())); - for (String _iter14 : this.lString) { - oprot.writeString(_iter14); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.lintString != null) { - oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); - { - oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size())); - for (IntString _iter15 : this.lintString) { - _iter15.write(oprot); - } - oprot.writeListEnd(); - } - oprot.writeFieldEnd(); - } - if (this.mStringString != null) { - oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); - { - oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.mStringString.size())); - for (Map.Entry _iter16 : this.mStringString.entrySet()) { - oprot.writeString(_iter16.getKey()); - oprot.writeString(_iter16.getValue()); - } - oprot.writeMapEnd(); - } - oprot.writeFieldEnd(); - } - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("Complex("); - boolean first = true; - - sb.append("aint:"); - sb.append(this.aint); - first = false; - if (!first) sb.append(", "); - sb.append("aString:"); - if (this.aString == null) { - sb.append("null"); - } else { - sb.append(this.aString); - } - first = false; - if (!first) sb.append(", "); - sb.append("lint:"); - if (this.lint == null) { - sb.append("null"); - } else { - sb.append(this.lint); - } - first = false; - if (!first) sb.append(", "); - sb.append("lString:"); - if (this.lString == null) { - sb.append("null"); - } else { - sb.append(this.lString); - } - first = false; - if (!first) sb.append(", "); - sb.append("lintString:"); - if (this.lintString == null) { - sb.append("null"); - } else { - sb.append(this.lintString); - } - first = false; - if (!first) sb.append(", "); - sb.append("mStringString:"); - if (this.mStringString == null) { - sb.append("null"); - } else { - sb.append(this.mStringString); - } - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java deleted file mode 100644 index 0fe0fb0..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import org.apache.thrift.*; - -public class Constants { - -} diff --git serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java deleted file mode 100644 index 248413b..0000000 --- serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java +++ /dev/null @@ -1,359 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.serde2.thrift.test; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.log4j.Logger; - -import org.apache.thrift.*; -import org.apache.thrift.meta_data.*; -import org.apache.thrift.protocol.*; - -public class IntString implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("IntString"); - private static final TField MYINT_FIELD_DESC = new TField("myint", TType.I32, (short)1); - private static final TField MY_STRING_FIELD_DESC = new TField("myString", TType.STRING, (short)2); - private static final TField UNDERSCORE_INT_FIELD_DESC = new TField("underscore_int", TType.I32, (short)3); - - public int myint; - public static final int MYINT = 1; - public String myString; - public static final int MYSTRING = 2; - public int underscore_int; - public static final int UNDERSCORE_INT = 3; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean myint = false; - public boolean underscore_int = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(MYSTRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); - - static { - FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap); - } - - public IntString() { - } - - public IntString( - int myint, - String myString, - int underscore_int) - { - this(); - this.myint = myint; - this.__isset.myint = true; - this.myString = myString; - this.underscore_int = underscore_int; - this.__isset.underscore_int = true; - } - - /** - * Performs a deep copy on other. - */ - public IntString(IntString other) { - __isset.myint = other.__isset.myint; - this.myint = other.myint; - if (other.isSetMyString()) { - this.myString = other.myString; - } - __isset.underscore_int = other.__isset.underscore_int; - this.underscore_int = other.underscore_int; - } - - @Override - public IntString clone() { - return new IntString(this); - } - - public int getMyint() { - return this.myint; - } - - public void setMyint(int myint) { - this.myint = myint; - this.__isset.myint = true; - } - - public void unsetMyint() { - this.__isset.myint = false; - } - - // Returns true if field myint is set (has been asigned a value) and false otherwise - public boolean isSetMyint() { - return this.__isset.myint; - } - - public void setMyintIsSet(boolean value) { - this.__isset.myint = value; - } - - public String getMyString() { - return this.myString; - } - - public void setMyString(String myString) { - this.myString = myString; - } - - public void unsetMyString() { - this.myString = null; - } - - // Returns true if field myString is set (has been asigned a value) and false otherwise - public boolean isSetMyString() { - return this.myString != null; - } - - public void setMyStringIsSet(boolean value) { - if (!value) { - this.myString = null; - } - } - - public int getUnderscore_int() { - return this.underscore_int; - } - - public void setUnderscore_int(int underscore_int) { - this.underscore_int = underscore_int; - this.__isset.underscore_int = true; - } - - public void unsetUnderscore_int() { - this.__isset.underscore_int = false; - } - - // Returns true if field underscore_int is set (has been asigned a value) and false otherwise - public boolean isSetUnderscore_int() { - return this.__isset.underscore_int; - } - - public void setUnderscore_intIsSet(boolean value) { - this.__isset.underscore_int = value; - } - - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case MYINT: - if (value == null) { - unsetMyint(); - } else { - setMyint((Integer)value); - } - break; - - case MYSTRING: - if (value == null) { - unsetMyString(); - } else { - setMyString((String)value); - } - break; - - case UNDERSCORE_INT: - if (value == null) { - unsetUnderscore_int(); - } else { - setUnderscore_int((Integer)value); - } - break; - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case MYINT: - return new Integer(getMyint()); - - case MYSTRING: - return getMyString(); - - case UNDERSCORE_INT: - return new Integer(getUnderscore_int()); - - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case MYINT: - return isSetMyint(); - case MYSTRING: - return isSetMyString(); - case UNDERSCORE_INT: - return isSetUnderscore_int(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } - } - - @Override - public boolean equals(Object that) { - if (that == null) - return false; - if (that instanceof IntString) - return this.equals((IntString)that); - return false; - } - - public boolean equals(IntString that) { - if (that == null) - return false; - - boolean this_present_myint = true; - boolean that_present_myint = true; - if (this_present_myint || that_present_myint) { - if (!(this_present_myint && that_present_myint)) - return false; - if (this.myint != that.myint) - return false; - } - - boolean this_present_myString = true && this.isSetMyString(); - boolean that_present_myString = true && that.isSetMyString(); - if (this_present_myString || that_present_myString) { - if (!(this_present_myString && that_present_myString)) - return false; - if (!this.myString.equals(that.myString)) - return false; - } - - boolean this_present_underscore_int = true; - boolean that_present_underscore_int = true; - if (this_present_underscore_int || that_present_underscore_int) { - if (!(this_present_underscore_int && that_present_underscore_int)) - return false; - if (this.underscore_int != that.underscore_int) - return false; - } - - return true; - } - - @Override - public int hashCode() { - return 0; - } - - public void read(TProtocol iprot) throws TException { - TField field; - iprot.readStructBegin(); - while (true) - { - field = iprot.readFieldBegin(); - if (field.type == TType.STOP) { - break; - } - switch (field.id) - { - case MYINT: - if (field.type == TType.I32) { - this.myint = iprot.readI32(); - this.__isset.myint = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case MYSTRING: - if (field.type == TType.STRING) { - this.myString = iprot.readString(); - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - case UNDERSCORE_INT: - if (field.type == TType.I32) { - this.underscore_int = iprot.readI32(); - this.__isset.underscore_int = true; - } else { - TProtocolUtil.skip(iprot, field.type); - } - break; - default: - TProtocolUtil.skip(iprot, field.type); - break; - } - iprot.readFieldEnd(); - } - iprot.readStructEnd(); - - - // check for required fields of primitive type, which can't be checked in the validate method - validate(); - } - - public void write(TProtocol oprot) throws TException { - validate(); - - oprot.writeStructBegin(STRUCT_DESC); - oprot.writeFieldBegin(MYINT_FIELD_DESC); - oprot.writeI32(this.myint); - oprot.writeFieldEnd(); - if (this.myString != null) { - oprot.writeFieldBegin(MY_STRING_FIELD_DESC); - oprot.writeString(this.myString); - oprot.writeFieldEnd(); - } - oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); - oprot.writeI32(this.underscore_int); - oprot.writeFieldEnd(); - oprot.writeFieldStop(); - oprot.writeStructEnd(); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder("IntString("); - boolean first = true; - - sb.append("myint:"); - sb.append(this.myint); - first = false; - if (!first) sb.append(", "); - sb.append("myString:"); - if (this.myString == null) { - sb.append("null"); - } else { - sb.append(this.myString); - } - first = false; - if (!first) sb.append(", "); - sb.append("underscore_int:"); - sb.append(this.underscore_int); - first = false; - sb.append(")"); - return sb.toString(); - } - - public void validate() throws TException { - // check for required fields - // check that fields of type enum have valid values - } - -} - diff --git serde/src/gen-javabean/org/apache/hadoop/hive/serde/Constants.java serde/src/gen-javabean/org/apache/hadoop/hive/serde/Constants.java new file mode 100644 index 0000000..b062442 --- /dev/null +++ serde/src/gen-javabean/org/apache/hadoop/hive/serde/Constants.java @@ -0,0 +1,111 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde; + +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 Constants { + + public static final String SERIALIZATION_LIB = "serialization.lib"; + + public static final String SERIALIZATION_CLASS = "serialization.class"; + + public static final String SERIALIZATION_FORMAT = "serialization.format"; + + public static final String SERIALIZATION_DDL = "serialization.ddl"; + + public static final String SERIALIZATION_NULL_FORMAT = "serialization.null.format"; + + public static final String SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest"; + + public static final String SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + + public static final String SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + + public static final String FIELD_DELIM = "field.delim"; + + public static final String COLLECTION_DELIM = "colelction.delim"; + + public static final String LINE_DELIM = "line.delim"; + + public static final String MAPKEY_DELIM = "mapkey.delim"; + + public static final String QUOTE_CHAR = "quote.delim"; + + public static final String ESCAPE_CHAR = "escape.delim"; + + public static final String VOID_TYPE_NAME = "void"; + + public static final String BOOLEAN_TYPE_NAME = "boolean"; + + public static final String TINYINT_TYPE_NAME = "tinyint"; + + public static final String SMALLINT_TYPE_NAME = "smallint"; + + public static final String INT_TYPE_NAME = "int"; + + public static final String BIGINT_TYPE_NAME = "bigint"; + + public static final String FLOAT_TYPE_NAME = "float"; + + public static final String DOUBLE_TYPE_NAME = "double"; + + public static final String STRING_TYPE_NAME = "string"; + + public static final String DATE_TYPE_NAME = "date"; + + public static final String DATETIME_TYPE_NAME = "datetime"; + + public static final String TIMESTAMP_TYPE_NAME = "timestamp"; + + public static final String LIST_TYPE_NAME = "array"; + + public static final String MAP_TYPE_NAME = "map"; + + public static final String STRUCT_TYPE_NAME = "struct"; + + public static final String UNION_TYPE_NAME = "uniontype"; + + public static final String LIST_COLUMNS = "columns"; + + public static final String LIST_COLUMN_TYPES = "columns.types"; + + public static final Set PrimitiveTypes = new HashSet(); + static { + PrimitiveTypes.add("void"); + PrimitiveTypes.add("boolean"); + PrimitiveTypes.add("tinyint"); + PrimitiveTypes.add("smallint"); + PrimitiveTypes.add("int"); + PrimitiveTypes.add("bigint"); + PrimitiveTypes.add("float"); + PrimitiveTypes.add("double"); + PrimitiveTypes.add("string"); + PrimitiveTypes.add("date"); + PrimitiveTypes.add("datetime"); + PrimitiveTypes.add("timestamp"); + } + + public static final Set CollectionTypes = new HashSet(); + static { + CollectionTypes.add("array"); + CollectionTypes.add("map"); + } + +} diff --git serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java new file mode 100644 index 0000000..248faa5 --- /dev/null +++ serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java @@ -0,0 +1,304 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde.test; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class InnerStruct implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("InnerStruct"); + + private static final TField FIELD0_FIELD_DESC = new TField("field0", TType.I32, (short)1); + + private int field0; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + FIELD0((short)1, "field0"); + + 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: // FIELD0 + return FIELD0; + 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 __FIELD0_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD0, new FieldMetaData("field0", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); + } + + public InnerStruct() { + } + + public InnerStruct( + int field0) + { + this(); + this.field0 = field0; + setField0IsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public InnerStruct(InnerStruct other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.field0 = other.field0; + } + + public InnerStruct deepCopy() { + return new InnerStruct(this); + } + + @Override + public void clear() { + setField0IsSet(false); + this.field0 = 0; + } + + public int getField0() { + return this.field0; + } + + public void setField0(int field0) { + this.field0 = field0; + setField0IsSet(true); + } + + public void unsetField0() { + __isset_bit_vector.clear(__FIELD0_ISSET_ID); + } + + /** Returns true if field field0 is set (has been asigned a value) and false otherwise */ + public boolean isSetField0() { + return __isset_bit_vector.get(__FIELD0_ISSET_ID); + } + + public void setField0IsSet(boolean value) { + __isset_bit_vector.set(__FIELD0_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD0: + if (value == null) { + unsetField0(); + } else { + setField0((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD0: + return new Integer(getField0()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD0: + return isSetField0(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof InnerStruct) + return this.equals((InnerStruct)that); + return false; + } + + public boolean equals(InnerStruct that) { + if (that == null) + return false; + + boolean this_present_field0 = true; + boolean that_present_field0 = true; + if (this_present_field0 || that_present_field0) { + if (!(this_present_field0 && that_present_field0)) + return false; + if (this.field0 != that.field0) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(InnerStruct other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + InnerStruct typedOther = (InnerStruct)other; + + lastComparison = Boolean.valueOf(isSetField0()).compareTo(typedOther.isSetField0()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField0()) { + lastComparison = TBaseHelper.compareTo(this.field0, typedOther.field0); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // FIELD0 + if (field.type == TType.I32) { + this.field0 = iprot.readI32(); + setField0IsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD0_FIELD_DESC); + oprot.writeI32(this.field0); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("InnerStruct("); + boolean first = true; + + sb.append("field0:"); + sb.append(this.field0); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java new file mode 100644 index 0000000..26ec311 --- /dev/null +++ serde/src/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java @@ -0,0 +1,518 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde.test; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("ThriftTestObj"); + + private static final TField FIELD1_FIELD_DESC = new TField("field1", TType.I32, (short)1); + private static final TField FIELD2_FIELD_DESC = new TField("field2", TType.STRING, (short)2); + private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.LIST, (short)3); + + private int field1; + private String field2; + private List field3; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + FIELD1((short)1, "field1"), + FIELD2((short)2, "field2"), + FIELD3((short)3, "field3"); + + 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: // FIELD1 + return FIELD1; + case 2: // FIELD2 + return FIELD2; + case 3: // FIELD3 + return FIELD3; + 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 __FIELD1_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, InnerStruct.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); + } + + public ThriftTestObj() { + } + + public ThriftTestObj( + int field1, + String field2, + List field3) + { + this(); + this.field1 = field1; + setField1IsSet(true); + this.field2 = field2; + this.field3 = field3; + } + + /** + * Performs a deep copy on other. + */ + public ThriftTestObj(ThriftTestObj other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.field1 = other.field1; + if (other.isSetField2()) { + this.field2 = other.field2; + } + if (other.isSetField3()) { + List __this__field3 = new ArrayList(); + for (InnerStruct other_element : other.field3) { + __this__field3.add(new InnerStruct(other_element)); + } + this.field3 = __this__field3; + } + } + + public ThriftTestObj deepCopy() { + return new ThriftTestObj(this); + } + + @Override + public void clear() { + setField1IsSet(false); + this.field1 = 0; + this.field2 = null; + this.field3 = null; + } + + public int getField1() { + return this.field1; + } + + public void setField1(int field1) { + this.field1 = field1; + setField1IsSet(true); + } + + public void unsetField1() { + __isset_bit_vector.clear(__FIELD1_ISSET_ID); + } + + /** Returns true if field field1 is set (has been asigned a value) and false otherwise */ + public boolean isSetField1() { + return __isset_bit_vector.get(__FIELD1_ISSET_ID); + } + + public void setField1IsSet(boolean value) { + __isset_bit_vector.set(__FIELD1_ISSET_ID, value); + } + + public String getField2() { + return this.field2; + } + + public void setField2(String field2) { + this.field2 = field2; + } + + public void unsetField2() { + this.field2 = null; + } + + /** Returns true if field field2 is set (has been asigned a value) and false otherwise */ + public boolean isSetField2() { + return this.field2 != null; + } + + public void setField2IsSet(boolean value) { + if (!value) { + this.field2 = null; + } + } + + public int getField3Size() { + return (this.field3 == null) ? 0 : this.field3.size(); + } + + public java.util.Iterator getField3Iterator() { + return (this.field3 == null) ? null : this.field3.iterator(); + } + + public void addToField3(InnerStruct elem) { + if (this.field3 == null) { + this.field3 = new ArrayList(); + } + this.field3.add(elem); + } + + public List getField3() { + return this.field3; + } + + public void setField3(List field3) { + this.field3 = field3; + } + + public void unsetField3() { + this.field3 = null; + } + + /** Returns true if field field3 is set (has been asigned a value) and false otherwise */ + public boolean isSetField3() { + return this.field3 != null; + } + + public void setField3IsSet(boolean value) { + if (!value) { + this.field3 = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case FIELD1: + if (value == null) { + unsetField1(); + } else { + setField1((Integer)value); + } + break; + + case FIELD2: + if (value == null) { + unsetField2(); + } else { + setField2((String)value); + } + break; + + case FIELD3: + if (value == null) { + unsetField3(); + } else { + setField3((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case FIELD1: + return new Integer(getField1()); + + case FIELD2: + return getField2(); + + case FIELD3: + return getField3(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case FIELD1: + return isSetField1(); + case FIELD2: + return isSetField2(); + case FIELD3: + return isSetField3(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ThriftTestObj) + return this.equals((ThriftTestObj)that); + return false; + } + + public boolean equals(ThriftTestObj that) { + if (that == null) + return false; + + boolean this_present_field1 = true; + boolean that_present_field1 = true; + if (this_present_field1 || that_present_field1) { + if (!(this_present_field1 && that_present_field1)) + return false; + if (this.field1 != that.field1) + return false; + } + + boolean this_present_field2 = true && this.isSetField2(); + boolean that_present_field2 = true && that.isSetField2(); + if (this_present_field2 || that_present_field2) { + if (!(this_present_field2 && that_present_field2)) + return false; + if (!this.field2.equals(that.field2)) + return false; + } + + boolean this_present_field3 = true && this.isSetField3(); + boolean that_present_field3 = true && that.isSetField3(); + if (this_present_field3 || that_present_field3) { + if (!(this_present_field3 && that_present_field3)) + return false; + if (!this.field3.equals(that.field3)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ThriftTestObj other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ThriftTestObj typedOther = (ThriftTestObj)other; + + lastComparison = Boolean.valueOf(isSetField1()).compareTo(typedOther.isSetField1()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField1()) { + lastComparison = TBaseHelper.compareTo(this.field1, typedOther.field1); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetField2()).compareTo(typedOther.isSetField2()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField2()) { + lastComparison = TBaseHelper.compareTo(this.field2, typedOther.field2); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetField3()).compareTo(typedOther.isSetField3()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetField3()) { + lastComparison = TBaseHelper.compareTo(this.field3, typedOther.field3); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // FIELD1 + if (field.type == TType.I32) { + this.field1 = iprot.readI32(); + setField1IsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // FIELD2 + if (field.type == TType.STRING) { + this.field2 = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // FIELD3 + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.field3 = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + InnerStruct _elem2; + _elem2 = new InnerStruct(); + _elem2.read(iprot); + this.field3.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(FIELD1_FIELD_DESC); + oprot.writeI32(this.field1); + oprot.writeFieldEnd(); + if (this.field2 != null) { + oprot.writeFieldBegin(FIELD2_FIELD_DESC); + oprot.writeString(this.field2); + oprot.writeFieldEnd(); + } + if (this.field3 != null) { + oprot.writeFieldBegin(FIELD3_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); + for (InnerStruct _iter3 : this.field3) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ThriftTestObj("); + boolean first = true; + + sb.append("field1:"); + sb.append(this.field1); + first = false; + if (!first) sb.append(", "); + sb.append("field2:"); + if (this.field2 == null) { + sb.append("null"); + } else { + sb.append(this.field2); + } + first = false; + if (!first) sb.append(", "); + sb.append("field3:"); + if (this.field3 == null) { + sb.append("null"); + } else { + sb.append(this.field3); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java new file mode 100644 index 0000000..1962098 --- /dev/null +++ serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java @@ -0,0 +1,901 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde2.thrift.test; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class Complex implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("Complex"); + + private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1); + private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2); + private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3); + private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4); + private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5); + private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6); + + private int aint; + private String aString; + private List lint; + private List lString; + private List lintString; + private Map mStringString; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + AINT((short)1, "aint"), + A_STRING((short)2, "aString"), + LINT((short)3, "lint"), + L_STRING((short)4, "lString"), + LINT_STRING((short)5, "lintString"), + M_STRING_STRING((short)6, "mStringString"); + + 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: // AINT + return AINT; + case 2: // A_STRING + return A_STRING; + case 3: // LINT + return LINT; + case 4: // L_STRING + return L_STRING; + case 5: // LINT_STRING + return LINT_STRING; + case 6: // M_STRING_STRING + return M_STRING_STRING; + 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 __AINT_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.A_STRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.I32)))); + tmpMap.put(_Fields.L_STRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new FieldValueMetaData(TType.STRING)))); + tmpMap.put(_Fields.LINT_STRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, + new ListMetaData(TType.LIST, + new StructMetaData(TType.STRUCT, IntString.class)))); + tmpMap.put(_Fields.M_STRING_STRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, + new MapMetaData(TType.MAP, + new FieldValueMetaData(TType.STRING), + new FieldValueMetaData(TType.STRING)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); + } + + public Complex() { + } + + public Complex( + int aint, + String aString, + List lint, + List lString, + List lintString, + Map mStringString) + { + this(); + this.aint = aint; + setAintIsSet(true); + this.aString = aString; + this.lint = lint; + this.lString = lString; + this.lintString = lintString; + this.mStringString = mStringString; + } + + /** + * Performs a deep copy on other. + */ + public Complex(Complex other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.aint = other.aint; + if (other.isSetAString()) { + this.aString = other.aString; + } + if (other.isSetLint()) { + List __this__lint = new ArrayList(); + for (Integer other_element : other.lint) { + __this__lint.add(other_element); + } + this.lint = __this__lint; + } + if (other.isSetLString()) { + List __this__lString = new ArrayList(); + for (String other_element : other.lString) { + __this__lString.add(other_element); + } + this.lString = __this__lString; + } + if (other.isSetLintString()) { + List __this__lintString = new ArrayList(); + for (IntString other_element : other.lintString) { + __this__lintString.add(new IntString(other_element)); + } + this.lintString = __this__lintString; + } + if (other.isSetMStringString()) { + Map __this__mStringString = new HashMap(); + for (Map.Entry other_element : other.mStringString.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__mStringString_copy_key = other_element_key; + + String __this__mStringString_copy_value = other_element_value; + + __this__mStringString.put(__this__mStringString_copy_key, __this__mStringString_copy_value); + } + this.mStringString = __this__mStringString; + } + } + + public Complex deepCopy() { + return new Complex(this); + } + + @Override + public void clear() { + setAintIsSet(false); + this.aint = 0; + this.aString = null; + this.lint = null; + this.lString = null; + this.lintString = null; + this.mStringString = null; + } + + public int getAint() { + return this.aint; + } + + public void setAint(int aint) { + this.aint = aint; + setAintIsSet(true); + } + + public void unsetAint() { + __isset_bit_vector.clear(__AINT_ISSET_ID); + } + + /** Returns true if field aint is set (has been asigned a value) and false otherwise */ + public boolean isSetAint() { + return __isset_bit_vector.get(__AINT_ISSET_ID); + } + + public void setAintIsSet(boolean value) { + __isset_bit_vector.set(__AINT_ISSET_ID, value); + } + + public String getAString() { + return this.aString; + } + + public void setAString(String aString) { + this.aString = aString; + } + + public void unsetAString() { + this.aString = null; + } + + /** Returns true if field aString is set (has been asigned a value) and false otherwise */ + public boolean isSetAString() { + return this.aString != null; + } + + public void setAStringIsSet(boolean value) { + if (!value) { + this.aString = null; + } + } + + public int getLintSize() { + return (this.lint == null) ? 0 : this.lint.size(); + } + + public java.util.Iterator getLintIterator() { + return (this.lint == null) ? null : this.lint.iterator(); + } + + public void addToLint(int elem) { + if (this.lint == null) { + this.lint = new ArrayList(); + } + this.lint.add(elem); + } + + public List getLint() { + return this.lint; + } + + public void setLint(List lint) { + this.lint = lint; + } + + public void unsetLint() { + this.lint = null; + } + + /** Returns true if field lint is set (has been asigned a value) and false otherwise */ + public boolean isSetLint() { + return this.lint != null; + } + + public void setLintIsSet(boolean value) { + if (!value) { + this.lint = null; + } + } + + public int getLStringSize() { + return (this.lString == null) ? 0 : this.lString.size(); + } + + public java.util.Iterator getLStringIterator() { + return (this.lString == null) ? null : this.lString.iterator(); + } + + public void addToLString(String elem) { + if (this.lString == null) { + this.lString = new ArrayList(); + } + this.lString.add(elem); + } + + public List getLString() { + return this.lString; + } + + public void setLString(List lString) { + this.lString = lString; + } + + public void unsetLString() { + this.lString = null; + } + + /** Returns true if field lString is set (has been asigned a value) and false otherwise */ + public boolean isSetLString() { + return this.lString != null; + } + + public void setLStringIsSet(boolean value) { + if (!value) { + this.lString = null; + } + } + + public int getLintStringSize() { + return (this.lintString == null) ? 0 : this.lintString.size(); + } + + public java.util.Iterator getLintStringIterator() { + return (this.lintString == null) ? null : this.lintString.iterator(); + } + + public void addToLintString(IntString elem) { + if (this.lintString == null) { + this.lintString = new ArrayList(); + } + this.lintString.add(elem); + } + + public List getLintString() { + return this.lintString; + } + + public void setLintString(List lintString) { + this.lintString = lintString; + } + + public void unsetLintString() { + this.lintString = null; + } + + /** Returns true if field lintString is set (has been asigned a value) and false otherwise */ + public boolean isSetLintString() { + return this.lintString != null; + } + + public void setLintStringIsSet(boolean value) { + if (!value) { + this.lintString = null; + } + } + + public int getMStringStringSize() { + return (this.mStringString == null) ? 0 : this.mStringString.size(); + } + + public void putToMStringString(String key, String val) { + if (this.mStringString == null) { + this.mStringString = new HashMap(); + } + this.mStringString.put(key, val); + } + + public Map getMStringString() { + return this.mStringString; + } + + public void setMStringString(Map mStringString) { + this.mStringString = mStringString; + } + + public void unsetMStringString() { + this.mStringString = null; + } + + /** Returns true if field mStringString is set (has been asigned a value) and false otherwise */ + public boolean isSetMStringString() { + return this.mStringString != null; + } + + public void setMStringStringIsSet(boolean value) { + if (!value) { + this.mStringString = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case AINT: + if (value == null) { + unsetAint(); + } else { + setAint((Integer)value); + } + break; + + case A_STRING: + if (value == null) { + unsetAString(); + } else { + setAString((String)value); + } + break; + + case LINT: + if (value == null) { + unsetLint(); + } else { + setLint((List)value); + } + break; + + case L_STRING: + if (value == null) { + unsetLString(); + } else { + setLString((List)value); + } + break; + + case LINT_STRING: + if (value == null) { + unsetLintString(); + } else { + setLintString((List)value); + } + break; + + case M_STRING_STRING: + if (value == null) { + unsetMStringString(); + } else { + setMStringString((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case AINT: + return new Integer(getAint()); + + case A_STRING: + return getAString(); + + case LINT: + return getLint(); + + case L_STRING: + return getLString(); + + case LINT_STRING: + return getLintString(); + + case M_STRING_STRING: + return getMStringString(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case AINT: + return isSetAint(); + case A_STRING: + return isSetAString(); + case LINT: + return isSetLint(); + case L_STRING: + return isSetLString(); + case LINT_STRING: + return isSetLintString(); + case M_STRING_STRING: + return isSetMStringString(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Complex) + return this.equals((Complex)that); + return false; + } + + public boolean equals(Complex that) { + if (that == null) + return false; + + boolean this_present_aint = true; + boolean that_present_aint = true; + if (this_present_aint || that_present_aint) { + if (!(this_present_aint && that_present_aint)) + return false; + if (this.aint != that.aint) + return false; + } + + boolean this_present_aString = true && this.isSetAString(); + boolean that_present_aString = true && that.isSetAString(); + if (this_present_aString || that_present_aString) { + if (!(this_present_aString && that_present_aString)) + return false; + if (!this.aString.equals(that.aString)) + return false; + } + + boolean this_present_lint = true && this.isSetLint(); + boolean that_present_lint = true && that.isSetLint(); + if (this_present_lint || that_present_lint) { + if (!(this_present_lint && that_present_lint)) + return false; + if (!this.lint.equals(that.lint)) + return false; + } + + boolean this_present_lString = true && this.isSetLString(); + boolean that_present_lString = true && that.isSetLString(); + if (this_present_lString || that_present_lString) { + if (!(this_present_lString && that_present_lString)) + return false; + if (!this.lString.equals(that.lString)) + return false; + } + + boolean this_present_lintString = true && this.isSetLintString(); + boolean that_present_lintString = true && that.isSetLintString(); + if (this_present_lintString || that_present_lintString) { + if (!(this_present_lintString && that_present_lintString)) + return false; + if (!this.lintString.equals(that.lintString)) + return false; + } + + boolean this_present_mStringString = true && this.isSetMStringString(); + boolean that_present_mStringString = true && that.isSetMStringString(); + if (this_present_mStringString || that_present_mStringString) { + if (!(this_present_mStringString && that_present_mStringString)) + return false; + if (!this.mStringString.equals(that.mStringString)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Complex other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Complex typedOther = (Complex)other; + + lastComparison = Boolean.valueOf(isSetAint()).compareTo(typedOther.isSetAint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAint()) { + lastComparison = TBaseHelper.compareTo(this.aint, typedOther.aint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAString()).compareTo(typedOther.isSetAString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAString()) { + lastComparison = TBaseHelper.compareTo(this.aString, typedOther.aString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLint()).compareTo(typedOther.isSetLint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLint()) { + lastComparison = TBaseHelper.compareTo(this.lint, typedOther.lint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLString()).compareTo(typedOther.isSetLString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLString()) { + lastComparison = TBaseHelper.compareTo(this.lString, typedOther.lString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetLintString()).compareTo(typedOther.isSetLintString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetLintString()) { + lastComparison = TBaseHelper.compareTo(this.lintString, typedOther.lintString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMStringString()).compareTo(typedOther.isSetMStringString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMStringString()) { + lastComparison = TBaseHelper.compareTo(this.mStringString, typedOther.mStringString); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // AINT + if (field.type == TType.I32) { + this.aint = iprot.readI32(); + setAintIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // A_STRING + if (field.type == TType.STRING) { + this.aString = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // LINT + if (field.type == TType.LIST) { + { + TList _list0 = iprot.readListBegin(); + this.lint = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + int _elem2; + _elem2 = iprot.readI32(); + this.lint.add(_elem2); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 4: // L_STRING + if (field.type == TType.LIST) { + { + TList _list3 = iprot.readListBegin(); + this.lString = new ArrayList(_list3.size); + for (int _i4 = 0; _i4 < _list3.size; ++_i4) + { + String _elem5; + _elem5 = iprot.readString(); + this.lString.add(_elem5); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 5: // LINT_STRING + if (field.type == TType.LIST) { + { + TList _list6 = iprot.readListBegin(); + this.lintString = new ArrayList(_list6.size); + for (int _i7 = 0; _i7 < _list6.size; ++_i7) + { + IntString _elem8; + _elem8 = new IntString(); + _elem8.read(iprot); + this.lintString.add(_elem8); + } + iprot.readListEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 6: // M_STRING_STRING + if (field.type == TType.MAP) { + { + TMap _map9 = iprot.readMapBegin(); + this.mStringString = new HashMap(2*_map9.size); + for (int _i10 = 0; _i10 < _map9.size; ++_i10) + { + String _key11; + String _val12; + _key11 = iprot.readString(); + _val12 = iprot.readString(); + this.mStringString.put(_key11, _val12); + } + iprot.readMapEnd(); + } + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(AINT_FIELD_DESC); + oprot.writeI32(this.aint); + oprot.writeFieldEnd(); + if (this.aString != null) { + oprot.writeFieldBegin(A_STRING_FIELD_DESC); + oprot.writeString(this.aString); + oprot.writeFieldEnd(); + } + if (this.lint != null) { + oprot.writeFieldBegin(LINT_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.I32, this.lint.size())); + for (int _iter13 : this.lint) + { + oprot.writeI32(_iter13); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.lString != null) { + oprot.writeFieldBegin(L_STRING_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRING, this.lString.size())); + for (String _iter14 : this.lString) + { + oprot.writeString(_iter14); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.lintString != null) { + oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); + { + oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size())); + for (IntString _iter15 : this.lintString) + { + _iter15.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (this.mStringString != null) { + oprot.writeFieldBegin(M_STRING_STRING_FIELD_DESC); + { + oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.mStringString.size())); + for (Map.Entry _iter16 : this.mStringString.entrySet()) + { + oprot.writeString(_iter16.getKey()); + oprot.writeString(_iter16.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Complex("); + boolean first = true; + + sb.append("aint:"); + sb.append(this.aint); + first = false; + if (!first) sb.append(", "); + sb.append("aString:"); + if (this.aString == null) { + sb.append("null"); + } else { + sb.append(this.aString); + } + first = false; + if (!first) sb.append(", "); + sb.append("lint:"); + if (this.lint == null) { + sb.append("null"); + } else { + sb.append(this.lint); + } + first = false; + if (!first) sb.append(", "); + sb.append("lString:"); + if (this.lString == null) { + sb.append("null"); + } else { + sb.append(this.lString); + } + first = false; + if (!first) sb.append(", "); + sb.append("lintString:"); + if (this.lintString == null) { + sb.append("null"); + } else { + sb.append(this.lintString); + } + first = false; + if (!first) sb.append(", "); + sb.append("mStringString:"); + if (this.mStringString == null) { + sb.append("null"); + } else { + sb.append(this.mStringString); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java new file mode 100644 index 0000000..65dab7e --- /dev/null +++ serde/src/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/IntString.java @@ -0,0 +1,475 @@ +/** + * Autogenerated by Thrift + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + */ +package org.apache.hadoop.hive.serde2.thrift.test; + +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; + +import org.apache.thrift.*; +import org.apache.thrift.async.*; +import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; +import org.apache.thrift.protocol.*; + +public class IntString implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("IntString"); + + private static final TField MYINT_FIELD_DESC = new TField("myint", TType.I32, (short)1); + private static final TField MY_STRING_FIELD_DESC = new TField("myString", TType.STRING, (short)2); + private static final TField UNDERSCORE_INT_FIELD_DESC = new TField("underscore_int", TType.I32, (short)3); + + private int myint; + private String myString; + private int underscore_int; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + MYINT((short)1, "myint"), + MY_STRING((short)2, "myString"), + UNDERSCORE_INT((short)3, "underscore_int"); + + 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: // MYINT + return MYINT; + case 2: // MY_STRING + return MY_STRING; + case 3: // UNDERSCORE_INT + return UNDERSCORE_INT; + 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 __MYINT_ISSET_ID = 0; + private static final int __UNDERSCORE_INT_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + tmpMap.put(_Fields.MY_STRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap); + } + + public IntString() { + } + + public IntString( + int myint, + String myString, + int underscore_int) + { + this(); + this.myint = myint; + setMyintIsSet(true); + this.myString = myString; + this.underscore_int = underscore_int; + setUnderscore_intIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public IntString(IntString other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.myint = other.myint; + if (other.isSetMyString()) { + this.myString = other.myString; + } + this.underscore_int = other.underscore_int; + } + + public IntString deepCopy() { + return new IntString(this); + } + + @Override + public void clear() { + setMyintIsSet(false); + this.myint = 0; + this.myString = null; + setUnderscore_intIsSet(false); + this.underscore_int = 0; + } + + public int getMyint() { + return this.myint; + } + + public void setMyint(int myint) { + this.myint = myint; + setMyintIsSet(true); + } + + public void unsetMyint() { + __isset_bit_vector.clear(__MYINT_ISSET_ID); + } + + /** Returns true if field myint is set (has been asigned a value) and false otherwise */ + public boolean isSetMyint() { + return __isset_bit_vector.get(__MYINT_ISSET_ID); + } + + public void setMyintIsSet(boolean value) { + __isset_bit_vector.set(__MYINT_ISSET_ID, value); + } + + public String getMyString() { + return this.myString; + } + + public void setMyString(String myString) { + this.myString = myString; + } + + public void unsetMyString() { + this.myString = null; + } + + /** Returns true if field myString is set (has been asigned a value) and false otherwise */ + public boolean isSetMyString() { + return this.myString != null; + } + + public void setMyStringIsSet(boolean value) { + if (!value) { + this.myString = null; + } + } + + public int getUnderscore_int() { + return this.underscore_int; + } + + public void setUnderscore_int(int underscore_int) { + this.underscore_int = underscore_int; + setUnderscore_intIsSet(true); + } + + public void unsetUnderscore_int() { + __isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID); + } + + /** Returns true if field underscore_int is set (has been asigned a value) and false otherwise */ + public boolean isSetUnderscore_int() { + return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID); + } + + public void setUnderscore_intIsSet(boolean value) { + __isset_bit_vector.set(__UNDERSCORE_INT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MYINT: + if (value == null) { + unsetMyint(); + } else { + setMyint((Integer)value); + } + break; + + case MY_STRING: + if (value == null) { + unsetMyString(); + } else { + setMyString((String)value); + } + break; + + case UNDERSCORE_INT: + if (value == null) { + unsetUnderscore_int(); + } else { + setUnderscore_int((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MYINT: + return new Integer(getMyint()); + + case MY_STRING: + return getMyString(); + + case UNDERSCORE_INT: + return new Integer(getUnderscore_int()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MYINT: + return isSetMyint(); + case MY_STRING: + return isSetMyString(); + case UNDERSCORE_INT: + return isSetUnderscore_int(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IntString) + return this.equals((IntString)that); + return false; + } + + public boolean equals(IntString that) { + if (that == null) + return false; + + boolean this_present_myint = true; + boolean that_present_myint = true; + if (this_present_myint || that_present_myint) { + if (!(this_present_myint && that_present_myint)) + return false; + if (this.myint != that.myint) + return false; + } + + boolean this_present_myString = true && this.isSetMyString(); + boolean that_present_myString = true && that.isSetMyString(); + if (this_present_myString || that_present_myString) { + if (!(this_present_myString && that_present_myString)) + return false; + if (!this.myString.equals(that.myString)) + return false; + } + + boolean this_present_underscore_int = true; + boolean that_present_underscore_int = true; + if (this_present_underscore_int || that_present_underscore_int) { + if (!(this_present_underscore_int && that_present_underscore_int)) + return false; + if (this.underscore_int != that.underscore_int) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(IntString other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IntString typedOther = (IntString)other; + + lastComparison = Boolean.valueOf(isSetMyint()).compareTo(typedOther.isSetMyint()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMyint()) { + lastComparison = TBaseHelper.compareTo(this.myint, typedOther.myint); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMyString()).compareTo(typedOther.isSetMyString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMyString()) { + lastComparison = TBaseHelper.compareTo(this.myString, typedOther.myString); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetUnderscore_int()).compareTo(typedOther.isSetUnderscore_int()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetUnderscore_int()) { + lastComparison = TBaseHelper.compareTo(this.underscore_int, typedOther.underscore_int); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(TProtocol iprot) throws TException { + TField field; + iprot.readStructBegin(); + while (true) + { + field = iprot.readFieldBegin(); + if (field.type == TType.STOP) { + break; + } + switch (field.id) { + case 1: // MYINT + if (field.type == TType.I32) { + this.myint = iprot.readI32(); + setMyintIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 2: // MY_STRING + if (field.type == TType.STRING) { + this.myString = iprot.readString(); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + case 3: // UNDERSCORE_INT + if (field.type == TType.I32) { + this.underscore_int = iprot.readI32(); + setUnderscore_intIsSet(true); + } else { + TProtocolUtil.skip(iprot, field.type); + } + break; + default: + TProtocolUtil.skip(iprot, field.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + validate(); + } + + public void write(TProtocol oprot) throws TException { + validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(MYINT_FIELD_DESC); + oprot.writeI32(this.myint); + oprot.writeFieldEnd(); + if (this.myString != null) { + oprot.writeFieldBegin(MY_STRING_FIELD_DESC); + oprot.writeString(this.myString); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(UNDERSCORE_INT_FIELD_DESC); + oprot.writeI32(this.underscore_int); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("IntString("); + boolean first = true; + + sb.append("myint:"); + sb.append(this.myint); + first = false; + if (!first) sb.append(", "); + sb.append("myString:"); + if (this.myString == null) { + sb.append("null"); + } else { + sb.append(this.myString); + } + first = false; + if (!first) sb.append(", "); + sb.append("underscore_int:"); + sb.append(this.underscore_int); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws TException { + // check for required fields + } + +} + diff --git serde/src/gen-php/serde/serde_constants.php serde/src/gen-php/serde/serde_constants.php new file mode 100644 index 0000000..b889487 --- /dev/null +++ serde/src/gen-php/serde/serde_constants.php @@ -0,0 +1,95 @@ + true, + "boolean" => true, + "tinyint" => true, + "smallint" => true, + "int" => true, + "bigint" => true, + "float" => true, + "double" => true, + "string" => true, + "date" => true, + "datetime" => true, + "timestamp" => true, +); + +$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array( + "array" => true, + "map" => true, +); + +?> diff --git serde/src/gen-php/serde/serde_types.php serde/src/gen-php/serde/serde_types.php new file mode 100644 index 0000000..e7a2275 --- /dev/null +++ serde/src/gen-php/serde/serde_types.php @@ -0,0 +1,10 @@ + diff --git serde/src/gen-php/serde_constants.php serde/src/gen-php/serde_constants.php deleted file mode 100644 index f6f6baa..0000000 --- serde/src/gen-php/serde_constants.php +++ /dev/null @@ -1,93 +0,0 @@ - true, - "boolean" => true, - "tinyint" => true, - "smallint" => true, - "int" => true, - "bigint" => true, - "float" => true, - "double" => true, - "string" => true, - "date" => true, - "datetime" => true, - "timestamp" => true, -); - -$GLOBALS['serde_CONSTANTS']['CollectionTypes'] = array( - "array" => true, - "map" => true, -); - -?> diff --git serde/src/gen-php/serde_types.php serde/src/gen-php/serde_types.php deleted file mode 100644 index e7a2275..0000000 --- serde/src/gen-php/serde_types.php +++ /dev/null @@ -1,10 +0,0 @@ - diff --git serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py index 89ac083..50782d1 100644 --- serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py +++ serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py @@ -8,69 +8,37 @@ from thrift.Thrift import * from ttypes import * SERIALIZATION_LIB = "serialization.lib" - SERIALIZATION_CLASS = "serialization.class" - SERIALIZATION_FORMAT = "serialization.format" - SERIALIZATION_DDL = "serialization.ddl" - SERIALIZATION_NULL_FORMAT = "serialization.null.format" - SERIALIZATION_LAST_COLUMN_TAKES_REST = "serialization.last.column.takes.rest" - SERIALIZATION_SORT_ORDER = "serialization.sort.order" - SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object" - FIELD_DELIM = "field.delim" - COLLECTION_DELIM = "colelction.delim" - LINE_DELIM = "line.delim" - MAPKEY_DELIM = "mapkey.delim" - QUOTE_CHAR = "quote.delim" - ESCAPE_CHAR = "escape.delim" - VOID_TYPE_NAME = "void" - BOOLEAN_TYPE_NAME = "boolean" - TINYINT_TYPE_NAME = "tinyint" - SMALLINT_TYPE_NAME = "smallint" - INT_TYPE_NAME = "int" - BIGINT_TYPE_NAME = "bigint" - FLOAT_TYPE_NAME = "float" - DOUBLE_TYPE_NAME = "double" - STRING_TYPE_NAME = "string" - DATE_TYPE_NAME = "date" - DATETIME_TYPE_NAME = "datetime" - TIMESTAMP_TYPE_NAME = "timestamp" - LIST_TYPE_NAME = "array" - MAP_TYPE_NAME = "map" - STRUCT_TYPE_NAME = "struct" - UNION_TYPE_NAME = "uniontype" - LIST_COLUMNS = "columns" - LIST_COLUMN_TYPES = "columns.types" - PrimitiveTypes = set([ "void", "boolean", @@ -85,9 +53,7 @@ PrimitiveTypes = set([ "datetime", "timestamp", ]) - CollectionTypes = set([ "array", "map", ]) - diff --git serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py index c98f71f..b9cea2c 100644 --- serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py +++ serde/src/gen-py/org_apache_hadoop_hive_serde/ttypes.py @@ -7,7 +7,7 @@ from thrift.Thrift import * from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: diff --git serde/src/gen-py/serde/.gitignore serde/src/gen-py/serde/.gitignore deleted file mode 100644 index 0dd9890..0000000 --- serde/src/gen-py/serde/.gitignore +++ /dev/null @@ -1 +0,0 @@ -# Dummy file to make Git recognize this empty directory diff --git serde/src/gen-rb/serde_constants.rb serde/src/gen-rb/serde_constants.rb new file mode 100644 index 0000000..28dd381 --- /dev/null +++ serde/src/gen-rb/serde_constants.rb @@ -0,0 +1,92 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'serde_types' + +SERIALIZATION_LIB = %q"serialization.lib" + +SERIALIZATION_CLASS = %q"serialization.class" + +SERIALIZATION_FORMAT = %q"serialization.format" + +SERIALIZATION_DDL = %q"serialization.ddl" + +SERIALIZATION_NULL_FORMAT = %q"serialization.null.format" + +SERIALIZATION_LAST_COLUMN_TAKES_REST = %q"serialization.last.column.takes.rest" + +SERIALIZATION_SORT_ORDER = %q"serialization.sort.order" + +SERIALIZATION_USE_JSON_OBJECTS = %q"serialization.use.json.object" + +FIELD_DELIM = %q"field.delim" + +COLLECTION_DELIM = %q"colelction.delim" + +LINE_DELIM = %q"line.delim" + +MAPKEY_DELIM = %q"mapkey.delim" + +QUOTE_CHAR = %q"quote.delim" + +ESCAPE_CHAR = %q"escape.delim" + +VOID_TYPE_NAME = %q"void" + +BOOLEAN_TYPE_NAME = %q"boolean" + +TINYINT_TYPE_NAME = %q"tinyint" + +SMALLINT_TYPE_NAME = %q"smallint" + +INT_TYPE_NAME = %q"int" + +BIGINT_TYPE_NAME = %q"bigint" + +FLOAT_TYPE_NAME = %q"float" + +DOUBLE_TYPE_NAME = %q"double" + +STRING_TYPE_NAME = %q"string" + +DATE_TYPE_NAME = %q"date" + +DATETIME_TYPE_NAME = %q"datetime" + +TIMESTAMP_TYPE_NAME = %q"timestamp" + +LIST_TYPE_NAME = %q"array" + +MAP_TYPE_NAME = %q"map" + +STRUCT_TYPE_NAME = %q"struct" + +UNION_TYPE_NAME = %q"uniontype" + +LIST_COLUMNS = %q"columns" + +LIST_COLUMN_TYPES = %q"columns.types" + +PrimitiveTypes = Set.new([ + %q"void", + %q"boolean", + %q"tinyint", + %q"smallint", + %q"int", + %q"bigint", + %q"float", + %q"double", + %q"string", + %q"date", + %q"datetime", + %q"timestamp", +]) + +CollectionTypes = Set.new([ + %q"array", + %q"map", +]) + diff --git serde/src/gen-rb/serde_types.rb serde/src/gen-rb/serde_types.rb new file mode 100644 index 0000000..d5b1654 --- /dev/null +++ serde/src/gen-rb/serde_types.rb @@ -0,0 +1,7 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + + diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java index 961c24f..2a4d0b7 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java @@ -19,6 +19,7 @@ package org.apache.hadoop.hive.serde2.thrift; import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; import java.util.Arrays; import java.util.Properties; @@ -345,12 +346,39 @@ public class TBinarySortableProtocol extends TProtocol implements } @Override + public void writeBinary(ByteBuffer bin) throws TException { + if (bin == null) { + writeRawBytes(nullByte, 0, 1); + return; + } + + int length = bin.limit() - bin.position() - bin.arrayOffset(); + if (bin.hasArray()) { + writeBinary(bin.array(), bin.arrayOffset() + bin.position(), + length); + } else { + byte []copy = new byte[length]; + bin.get(copy); + writeBinary(copy); + } + } + public void writeBinary(byte[] bin) throws TException { if (bin == null) { writeRawBytes(nullByte, 0, 1); } else { - writeI32(bin.length); - writeRawBytes(bin, 0, bin.length); + writeBinary(bin, 0, bin.length); + } + } + + + public void writeBinary(byte[] bin, int offset, int length) + throws TException { + if (bin == null) { + writeRawBytes(nullByte, 0, 1); + } else { + writeI32(length); + writeRawBytes(bin, offset, length); } } @@ -612,14 +640,14 @@ public class TBinarySortableProtocol extends TProtocol implements } @Override - public byte[] readBinary() throws TException { + public ByteBuffer readBinary() throws TException { int size = readI32(); if (lastPrimitiveWasNull) { return null; } byte[] buf = new byte[size]; readRawAll(buf, 0, size); - return buf; + return ByteBuffer.wrap(buf); } boolean lastPrimitiveWasNull; diff --git serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java index e781a06..5757e3b 100644 --- serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java +++ serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java @@ -20,6 +20,7 @@ package org.apache.hadoop.hive.serde2.thrift; import java.io.EOFException; import java.nio.charset.CharacterCodingException; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.NoSuchElementException; import java.util.Properties; @@ -605,7 +606,7 @@ public class TCTLSeparatedProtocol extends TProtocol implements } @Override - public void writeBinary(byte[] bin) throws TException { + public void writeBinary(ByteBuffer bin) throws TException { throw new TException( "Ctl separated protocol cannot support writing Binary data!"); } @@ -838,7 +839,7 @@ public class TCTLSeparatedProtocol extends TProtocol implements } @Override - public byte[] readBinary() throws TException { + public ByteBuffer readBinary() throws TException { throw new TException("Not implemented for control separated data"); } } diff --git service/build.xml service/build.xml index ffd1854..c45b030 100644 --- service/build.xml +++ service/build.xml @@ -26,7 +26,6 @@ - @@ -41,10 +40,10 @@ - - Executing thrift (which needs to be in your path) on if/hive_service.thrift - - + + Executing ${thrift.home}/bin/thrift on ${ant.project.name}/if/hive_service.thrift + + diff --git service/if/hive_service.thrift service/if/hive_service.thrift index db9fab6..2799010 100644 --- service/if/hive_service.thrift +++ service/if/hive_service.thrift @@ -24,7 +24,7 @@ # TODO: include/thrift is shared among different components. It # should not be under metastore. -include "thrift/fb303/if/fb303.thrift" +include "share/fb303/if/fb303.thrift" include "metastore/if/hive_metastore.thrift" include "ql/if/queryplan.thrift" diff --git service/include/thrift/TLogging.h service/include/thrift/TLogging.h deleted file mode 100644 index 2df82dd..0000000 --- service/include/thrift/TLogging.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TLOGGING_H_ -#define _THRIFT_TLOGGING_H_ 1 - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -/** - * Contains utility macros for debugging and logging. - * - */ - -#ifndef HAVE_CLOCK_GETTIME -#include -#else -#include -#endif - -#ifdef HAVE_STDINT_H -#include -#endif - -/** - * T_GLOBAL_DEBUGGING_LEVEL = 0: all debugging turned off, debug macros undefined - * T_GLOBAL_DEBUGGING_LEVEL = 1: all debugging turned on - */ -#define T_GLOBAL_DEBUGGING_LEVEL 0 - - -/** - * T_GLOBAL_LOGGING_LEVEL = 0: all logging turned off, logging macros undefined - * T_GLOBAL_LOGGING_LEVEL = 1: all logging turned on - */ -#define T_GLOBAL_LOGGING_LEVEL 1 - - -/** - * Standard wrapper around fprintf what will prefix the file name and line - * number to the line. Uses T_GLOBAL_DEBUGGING_LEVEL to control whether it is - * turned on or off. - * - * @param format_string - */ -#if T_GLOBAL_DEBUGGING_LEVEL > 0 - #define T_DEBUG(format_string,...) \ - if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \ - fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \ - } -#else - #define T_DEBUG(format_string,...) -#endif - - -/** - * analagous to T_DEBUG but also prints the time - * - * @param string format_string input: printf style format string - */ -#if T_GLOBAL_DEBUGGING_LEVEL > 0 - #define T_DEBUG_T(format_string,...) \ - { \ - if (T_GLOBAL_DEBUGGING_LEVEL > 0) { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - } \ - } -#else - #define T_DEBUG_T(format_string,...) -#endif - - -/** - * analagous to T_DEBUG but uses input level to determine whether or not the string - * should be logged. - * - * @param int level: specified debug level - * @param string format_string input: format string - */ -#define T_DEBUG_L(level, format_string,...) \ - if ((level) > 0) { \ - fprintf(stderr,"[%s,%d] " #format_string " \n", __FILE__, __LINE__,##__VA_ARGS__); \ - } - - -/** - * Explicit error logging. Prints time, file name and line number - * - * @param string format_string input: printf style format string - */ -#define T_ERROR(format_string,...) \ - { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] ERROR: " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - } - - -/** - * Analagous to T_ERROR, additionally aborting the process. - * WARNING: macro calls abort(), ending program execution - * - * @param string format_string input: printf style format string - */ -#define T_ERROR_ABORT(format_string,...) \ - { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s,%d] [%s] ERROR: Going to abort " #format_string " \n", __FILE__, __LINE__,dbgtime,##__VA_ARGS__); \ - exit(1); \ - } - - -/** - * Log input message - * - * @param string format_string input: printf style format string - */ -#if T_GLOBAL_LOGGING_LEVEL > 0 - #define T_LOG_OPER(format_string,...) \ - { \ - if (T_GLOBAL_LOGGING_LEVEL > 0) { \ - time_t now; \ - char dbgtime[26] ; \ - time(&now); \ - ctime_r(&now, dbgtime); \ - dbgtime[24] = '\0'; \ - fprintf(stderr,"[%s] " #format_string " \n", dbgtime,##__VA_ARGS__); \ - } \ - } -#else - #define T_LOG_OPER(format_string,...) -#endif - -#endif // #ifndef _THRIFT_TLOGGING_H_ diff --git service/include/thrift/TProcessor.h service/include/thrift/TProcessor.h deleted file mode 100644 index f2d5279..0000000 --- service/include/thrift/TProcessor.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TPROCESSOR_H_ -#define _THRIFT_TPROCESSOR_H_ 1 - -#include -#include -#include - -namespace apache { namespace thrift { - -/** - * A processor is a generic object that acts upon two streams of data, one - * an input and the other an output. The definition of this object is loose, - * though the typical case is for some sort of server that either generates - * responses to an input stream or forwards data from one pipe onto another. - * - */ -class TProcessor { - public: - virtual ~TProcessor() {} - - virtual bool process(boost::shared_ptr in, - boost::shared_ptr out) = 0; - - bool process(boost::shared_ptr io) { - return process(io, io); - } - - protected: - TProcessor() {} -}; - -}} // apache::thrift - -#endif // #ifndef _THRIFT_PROCESSOR_H_ diff --git service/include/thrift/TReflectionLocal.h service/include/thrift/TReflectionLocal.h deleted file mode 100644 index e83e475..0000000 --- service/include/thrift/TReflectionLocal.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TREFLECTIONLOCAL_H_ -#define _THRIFT_TREFLECTIONLOCAL_H_ 1 - -#include -#include -#include - -/** - * Local Reflection is a blanket term referring to the the structure - * and generation of this particular representation of Thrift types. - * (It is called local because it cannot be serialized by Thrift). - * - */ - -namespace apache { namespace thrift { namespace reflection { namespace local { - -using apache::thrift::protocol::TType; - -// We include this many bytes of the structure's fingerprint when serializing -// a top-level structure. Long enough to make collisions unlikely, short -// enough to not significantly affect the amount of memory used. -const int FP_PREFIX_LEN = 4; - -struct FieldMeta { - int16_t tag; - bool is_optional; -}; - -struct TypeSpec { - TType ttype; - uint8_t fp_prefix[FP_PREFIX_LEN]; - - // Use an anonymous union here so we can fit two TypeSpecs in one cache line. - union { - struct { - // Use parallel arrays here for denser packing (of the arrays). - FieldMeta* metas; - TypeSpec** specs; - } tstruct; - struct { - TypeSpec *subtype1; - TypeSpec *subtype2; - } tcontainer; - }; - - // Static initialization of unions isn't really possible, - // so take the plunge and use constructors. - // Hopefully they'll be evaluated at compile time. - - TypeSpec(TType ttype) : ttype(ttype) { - std::memset(fp_prefix, 0, FP_PREFIX_LEN); - } - - TypeSpec(TType ttype, - const uint8_t* fingerprint, - FieldMeta* metas, - TypeSpec** specs) : - ttype(ttype) - { - std::memcpy(fp_prefix, fingerprint, FP_PREFIX_LEN); - tstruct.metas = metas; - tstruct.specs = specs; - } - - TypeSpec(TType ttype, TypeSpec* subtype1, TypeSpec* subtype2) : - ttype(ttype) - { - std::memset(fp_prefix, 0, FP_PREFIX_LEN); - tcontainer.subtype1 = subtype1; - tcontainer.subtype2 = subtype2; - } - -}; - -}}}} // apache::thrift::reflection::local - -#endif // #ifndef _THRIFT_TREFLECTIONLOCAL_H_ diff --git service/include/thrift/Thrift.h service/include/thrift/Thrift.h deleted file mode 100644 index 27a6476..0000000 --- service/include/thrift/Thrift.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_THRIFT_H_ -#define _THRIFT_THRIFT_H_ 1 - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include - -#include -#include -#ifdef HAVE_INTTYPES_H -#include -#endif -#include -#include -#include -#include -#include -#include - -#include "TLogging.h" - -namespace apache { namespace thrift { - -class TOutput { - public: - TOutput() : f_(&errorTimeWrapper) {} - - inline void setOutputFunction(void (*function)(const char *)){ - f_ = function; - } - - inline void operator()(const char *message){ - f_(message); - } - - // It is important to have a const char* overload here instead of - // just the string version, otherwise errno could be corrupted - // if there is some problem allocating memory when constructing - // the string. - void perror(const char *message, int errno_copy); - inline void perror(const std::string &message, int errno_copy) { - perror(message.c_str(), errno_copy); - } - - void printf(const char *message, ...); - - inline static void errorTimeWrapper(const char* msg) { - time_t now; - char dbgtime[26]; - time(&now); - ctime_r(&now, dbgtime); - dbgtime[24] = 0; - fprintf(stderr, "Thrift: %s %s\n", dbgtime, msg); - } - - /** Just like strerror_r but returns a C++ string object. */ - static std::string strerror_s(int errno_copy); - - private: - void (*f_)(const char *); -}; - -extern TOutput GlobalOutput; - -namespace protocol { - class TProtocol; -} - -class TException : public std::exception { - public: - TException() {} - - TException(const std::string& message) : - message_(message) {} - - virtual ~TException() throw() {} - - virtual const char* what() const throw() { - if (message_.empty()) { - return "Default TException."; - } else { - return message_.c_str(); - } - } - - protected: - std::string message_; - -}; - -class TApplicationException : public TException { - public: - - /** - * Error codes for the various types of exceptions. - */ - enum TApplicationExceptionType - { UNKNOWN = 0 - , UNKNOWN_METHOD = 1 - , INVALID_MESSAGE_TYPE = 2 - , WRONG_METHOD_NAME = 3 - , BAD_SEQUENCE_ID = 4 - , MISSING_RESULT = 5 - }; - - TApplicationException() : - TException(), - type_(UNKNOWN) {} - - TApplicationException(TApplicationExceptionType type) : - TException(), - type_(type) {} - - TApplicationException(const std::string& message) : - TException(message), - type_(UNKNOWN) {} - - TApplicationException(TApplicationExceptionType type, - const std::string& message) : - TException(message), - type_(type) {} - - virtual ~TApplicationException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TApplicationExceptionType getType() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TApplicationException: Unknown application exception"; - case UNKNOWN_METHOD : return "TApplicationException: Unknown method"; - case INVALID_MESSAGE_TYPE : return "TApplicationException: Invalid message type"; - case WRONG_METHOD_NAME : return "TApplicationException: Wrong method name"; - case BAD_SEQUENCE_ID : return "TApplicationException: Bad sequence identifier"; - case MISSING_RESULT : return "TApplicationException: Missing result"; - default : return "TApplicationException: (Invalid exception type)"; - }; - } else { - return message_.c_str(); - } - } - - uint32_t read(protocol::TProtocol* iprot); - uint32_t write(protocol::TProtocol* oprot) const; - - protected: - /** - * Error code - */ - TApplicationExceptionType type_; - -}; - - -// Forward declare this structure used by TDenseProtocol -namespace reflection { namespace local { -struct TypeSpec; -}} - - -}} // apache::thrift - -#endif // #ifndef _THRIFT_THRIFT_H_ diff --git service/include/thrift/concurrency/Exception.h service/include/thrift/concurrency/Exception.h deleted file mode 100644 index ec46629..0000000 --- service/include/thrift/concurrency/Exception.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ -#define _THRIFT_CONCURRENCY_EXCEPTION_H_ 1 - -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -class NoSuchTaskException : public apache::thrift::TException {}; - -class UncancellableTaskException : public apache::thrift::TException {}; - -class InvalidArgumentException : public apache::thrift::TException {}; - -class IllegalStateException : public apache::thrift::TException {}; - -class TimedOutException : public apache::thrift::TException { -public: - TimedOutException():TException("TimedOutException"){}; - TimedOutException(const std::string& message ) : - TException(message) {} -}; - -class TooManyPendingTasksException : public apache::thrift::TException { -public: - TooManyPendingTasksException():TException("TooManyPendingTasksException"){}; - TooManyPendingTasksException(const std::string& message ) : - TException(message) {} -}; - -class SystemResourceException : public apache::thrift::TException { -public: - SystemResourceException() {} - - SystemResourceException(const std::string& message) : - TException(message) {} -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_EXCEPTION_H_ diff --git service/include/thrift/concurrency/FunctionRunner.h service/include/thrift/concurrency/FunctionRunner.h deleted file mode 100644 index 2216927..0000000 --- service/include/thrift/concurrency/FunctionRunner.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H -#define _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H 1 - -#include -#include "thrift/lib/cpp/concurrency/Thread.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Convenient implementation of Runnable that will execute arbitrary callbacks. - * Interfaces are provided to accept both a generic 'void(void)' callback, and - * a 'void* (void*)' pthread_create-style callback. - * - * Example use: - * void* my_thread_main(void* arg); - * shared_ptr factory = ...; - * shared_ptr thread = - * factory->newThread(shared_ptr( - * new FunctionRunner(my_thread_main, some_argument))); - * thread->start(); - * - * - */ - -class FunctionRunner : public Runnable { - public: - // This is the type of callback 'pthread_create()' expects. - typedef void* (*PthreadFuncPtr)(void *arg); - // This a fully-generic void(void) callback for custom bindings. - typedef std::tr1::function VoidFunc; - - /** - * Given a 'pthread_create' style callback, this FunctionRunner will - * execute the given callback. Note that the 'void*' return value is ignored. - */ - FunctionRunner(PthreadFuncPtr func, void* arg) - : func_(std::tr1::bind(func, arg)) - { } - - /** - * Given a generic callback, this FunctionRunner will execute it. - */ - FunctionRunner(const VoidFunc& cob) - : func_(cob) - { } - - - void run() { - func_(); - } - - private: - VoidFunc func_; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_FUNCTION_RUNNER_H diff --git service/include/thrift/concurrency/Monitor.h service/include/thrift/concurrency/Monitor.h deleted file mode 100644 index 234bf32..0000000 --- service/include/thrift/concurrency/Monitor.h +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_MONITOR_H_ -#define _THRIFT_CONCURRENCY_MONITOR_H_ 1 - -#include "Exception.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A monitor is a combination mutex and condition-event. Waiting and - * notifying condition events requires that the caller own the mutex. Mutex - * lock and unlock operations can be performed independently of condition - * events. This is more or less analogous to java.lang.Object multi-thread - * operations - * - * Note that all methods are const. Monitors implement logical constness, not - * bit constness. This allows const methods to call monitor methods without - * needing to cast away constness or change to non-const signatures. - * - * @version $Id:$ - */ -class Monitor { - - public: - - Monitor(); - - virtual ~Monitor(); - - virtual void lock() const; - - virtual void unlock() const; - - virtual void wait(int64_t timeout=0LL) const; - - virtual void notify() const; - - virtual void notifyAll() const; - - private: - - class Impl; - - Impl* impl_; -}; - -class Synchronized { - public: - - Synchronized(const Monitor& value) : - monitor_(value) { - monitor_.lock(); - } - - ~Synchronized() { - monitor_.unlock(); - } - - private: - const Monitor& monitor_; -}; - - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_MONITOR_H_ diff --git service/include/thrift/concurrency/Mutex.h service/include/thrift/concurrency/Mutex.h deleted file mode 100644 index 73c73e0..0000000 --- service/include/thrift/concurrency/Mutex.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_MUTEX_H_ -#define _THRIFT_CONCURRENCY_MUTEX_H_ 1 - -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A simple mutex class - * - * @version $Id:$ - */ -class Mutex { - public: - typedef void (*Initializer)(void*); - - Mutex(Initializer init = DEFAULT_INITIALIZER); - virtual ~Mutex() {} - virtual void lock() const; - virtual bool trylock() const; - virtual void unlock() const; - - static void DEFAULT_INITIALIZER(void*); - static void ADAPTIVE_INITIALIZER(void*); - static void RECURSIVE_INITIALIZER(void*); - - private: - - class impl; - boost::shared_ptr impl_; -}; - -class ReadWriteMutex { -public: - ReadWriteMutex(); - virtual ~ReadWriteMutex() {} - - // these get the lock and block until it is done successfully - virtual void acquireRead() const; - virtual void acquireWrite() const; - - // these attempt to get the lock, returning false immediately if they fail - virtual bool attemptRead() const; - virtual bool attemptWrite() const; - - // this releases both read and write locks - virtual void release() const; - -private: - - class impl; - boost::shared_ptr impl_; -}; - -class Guard { - public: - Guard(const Mutex& value) : mutex_(value) { - mutex_.lock(); - } - ~Guard() { - mutex_.unlock(); - } - - private: - const Mutex& mutex_; -}; - -class RWGuard { - public: - RWGuard(const ReadWriteMutex& value, bool write = 0) : rw_mutex_(value) { - if (write) { - rw_mutex_.acquireWrite(); - } else { - rw_mutex_.acquireRead(); - } - } - ~RWGuard() { - rw_mutex_.release(); - } - private: - const ReadWriteMutex& rw_mutex_; -}; - - -// A little hack to prevent someone from trying to do "Guard(m);" -// Such a use is invalid because the temporary Guard object is -// destoryed at the end of the line, releasing the lock. -// Sorry for polluting the global namespace, but I think it's worth it. -#define Guard(m) incorrect_use_of_Guard(m) -#define RWGuard(m) incorrect_use_of_RWGuard(m) - - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_MUTEX_H_ diff --git service/include/thrift/concurrency/PosixThreadFactory.h service/include/thrift/concurrency/PosixThreadFactory.h deleted file mode 100644 index d6d83a3..0000000 --- service/include/thrift/concurrency/PosixThreadFactory.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ -#define _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ 1 - -#include "Thread.h" - -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * A thread factory to create posix threads - * - * @version $Id:$ - */ -class PosixThreadFactory : public ThreadFactory { - - public: - - /** - * POSIX Thread scheduler policies - */ - enum POLICY { - OTHER, - FIFO, - ROUND_ROBIN - }; - - /** - * POSIX Thread scheduler relative priorities, - * - * Absolute priority is determined by scheduler policy and OS. This - * enumeration specifies relative priorities such that one can specify a - * priority withing a giving scheduler policy without knowing the absolute - * value of the priority. - */ - enum PRIORITY { - LOWEST = 0, - LOWER = 1, - LOW = 2, - NORMAL = 3, - HIGH = 4, - HIGHER = 5, - HIGHEST = 6, - INCREMENT = 7, - DECREMENT = 8 - }; - - /** - * Posix thread (pthread) factory. All threads created by a factory are reference-counted - * via boost::shared_ptr and boost::weak_ptr. The factory guarantees that threads and - * the Runnable tasks they host will be properly cleaned up once the last strong reference - * to both is given up. - * - * Threads are created with the specified policy, priority, stack-size and detachable-mode - * detached means the thread is free-running and will release all system resources the - * when it completes. A detachable thread is not joinable. The join method - * of a detachable thread will return immediately with no error. - * - * By default threads are not joinable. - */ - - PosixThreadFactory(POLICY policy=ROUND_ROBIN, PRIORITY priority=NORMAL, int stackSize=1, bool detached=true); - - // From ThreadFactory; - boost::shared_ptr newThread(boost::shared_ptr runnable) const; - - // From ThreadFactory; - Thread::id_t getCurrentThreadId() const; - - /** - * Gets stack size for created threads - * - * @return int size in megabytes - */ - virtual int getStackSize() const; - - /** - * Sets stack size for created threads - * - * @param value size in megabytes - */ - virtual void setStackSize(int value); - - /** - * Gets priority relative to current policy - */ - virtual PRIORITY getPriority() const; - - /** - * Sets priority relative to current policy - */ - virtual void setPriority(PRIORITY priority); - - /** - * Sets detached mode of threads - */ - virtual void setDetached(bool detached); - - /** - * Gets current detached mode - */ - virtual bool isDetached() const; - - private: - class Impl; - boost::shared_ptr impl_; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_POSIXTHREADFACTORY_H_ diff --git service/include/thrift/concurrency/Thread.h service/include/thrift/concurrency/Thread.h deleted file mode 100644 index d4282ad..0000000 --- service/include/thrift/concurrency/Thread.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_THREAD_H_ -#define _THRIFT_CONCURRENCY_THREAD_H_ 1 - -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -class Thread; - -/** - * Minimal runnable class. More or less analogous to java.lang.Runnable. - * - * @version $Id:$ - */ -class Runnable { - - public: - virtual ~Runnable() {}; - virtual void run() = 0; - - /** - * Gets the thread object that is hosting this runnable object - can return - * an empty boost::shared pointer if no references remain on thet thread object - */ - virtual boost::shared_ptr thread() { return thread_.lock(); } - - /** - * Sets the thread that is executing this object. This is only meant for - * use by concrete implementations of Thread. - */ - virtual void thread(boost::shared_ptr value) { thread_ = value; } - - private: - boost::weak_ptr thread_; -}; - -/** - * Minimal thread class. Returned by thread factory bound to a Runnable object - * and ready to start execution. More or less analogous to java.lang.Thread - * (minus all the thread group, priority, mode and other baggage, since that - * is difficult to abstract across platforms and is left for platform-specific - * ThreadFactory implemtations to deal with - * - * @see apache::thrift::concurrency::ThreadFactory) - */ -class Thread { - - public: - - typedef uint64_t id_t; - - virtual ~Thread() {}; - - /** - * Starts the thread. Does platform specific thread creation and - * configuration then invokes the run method of the Runnable object bound - * to this thread. - */ - virtual void start() = 0; - - /** - * Join this thread. Current thread blocks until this target thread - * completes. - */ - virtual void join() = 0; - - /** - * Gets the thread's platform-specific ID - */ - virtual id_t getId() = 0; - - /** - * Gets the runnable object this thread is hosting - */ - virtual boost::shared_ptr runnable() const { return _runnable; } - - protected: - virtual void runnable(boost::shared_ptr value) { _runnable = value; } - - private: - boost::shared_ptr _runnable; - -}; - -/** - * Factory to create platform-specific thread object and bind them to Runnable - * object for execution - */ -class ThreadFactory { - - public: - virtual ~ThreadFactory() {} - virtual boost::shared_ptr newThread(boost::shared_ptr runnable) const = 0; - - /** Gets the current thread id or unknown_thread_id if the current thread is not a thrift thread */ - - static const Thread::id_t unknown_thread_id; - - virtual Thread::id_t getCurrentThreadId() const = 0; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_THREAD_H_ diff --git service/include/thrift/concurrency/ThreadManager.h service/include/thrift/concurrency/ThreadManager.h deleted file mode 100644 index 6e5a178..0000000 --- service/include/thrift/concurrency/ThreadManager.h +++ /dev/null @@ -1,169 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_ -#define _THRIFT_CONCURRENCY_THREADMANAGER_H_ 1 - -#include -#include -#include "Thread.h" - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Thread Pool Manager and related classes - * - * @version $Id:$ - */ -class ThreadManager; - -/** - * ThreadManager class - * - * This class manages a pool of threads. It uses a ThreadFactory to create - * threads. It never actually creates or destroys worker threads, rather - * It maintains statistics on number of idle threads, number of active threads, - * task backlog, and average wait and service times and informs the PoolPolicy - * object bound to instances of this manager of interesting transitions. It is - * then up the PoolPolicy object to decide if the thread pool size needs to be - * adjusted and call this object addWorker and removeWorker methods to make - * changes. - * - * This design allows different policy implementations to used this code to - * handle basic worker thread management and worker task execution and focus on - * policy issues. The simplest policy, StaticPolicy, does nothing other than - * create a fixed number of threads. - */ -class ThreadManager { - - protected: - ThreadManager() {} - - public: - virtual ~ThreadManager() {} - - /** - * Starts the thread manager. Verifies all attributes have been properly - * initialized, then allocates necessary resources to begin operation - */ - virtual void start() = 0; - - /** - * Stops the thread manager. Aborts all remaining unprocessed task, shuts - * down all created worker threads, and realeases all allocated resources. - * This method blocks for all worker threads to complete, thus it can - * potentially block forever if a worker thread is running a task that - * won't terminate. - */ - virtual void stop() = 0; - - /** - * Joins the thread manager. This is the same as stop, except that it will - * block until all the workers have finished their work. At that point - * the ThreadManager will transition into the STOPPED state. - */ - virtual void join() = 0; - - enum STATE { - UNINITIALIZED, - STARTING, - STARTED, - JOINING, - STOPPING, - STOPPED - }; - - virtual const STATE state() const = 0; - - virtual boost::shared_ptr threadFactory() const = 0; - - virtual void threadFactory(boost::shared_ptr value) = 0; - - virtual void addWorker(size_t value=1) = 0; - - virtual void removeWorker(size_t value=1) = 0; - - /** - * Gets the current number of idle worker threads - */ - virtual size_t idleWorkerCount() const = 0; - - /** - * Gets the current number of total worker threads - */ - virtual size_t workerCount() const = 0; - - /** - * Gets the current number of pending tasks - */ - virtual size_t pendingTaskCount() const = 0; - - /** - * Gets the current number of pending and executing tasks - */ - virtual size_t totalTaskCount() const = 0; - - /** - * Gets the maximum pending task count. 0 indicates no maximum - */ - virtual size_t pendingTaskCountMax() const = 0; - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * This method will block if pendingTaskCountMax() in not zero and pendingTaskCount() - * is greater than or equalt to pendingTaskCountMax(). If this method is called in the - * context of a ThreadManager worker thread it will throw a - * TooManyPendingTasksException - * - * @param task The task to queue for execution - * - * @param timeout Time to wait in milliseconds to add a task when a pending-task-count - * is specified. Specific cases: - * timeout = 0 : Wait forever to queue task. - * timeout = -1 : Return immediately if pending task count exceeds specified max - * - * @throws TooManyPendingTasksException Pending task count exceeds max pending task count - */ - virtual void add(boost::shared_ptrtask, int64_t timeout=0LL) = 0; - - /** - * Removes a pending task - */ - virtual void remove(boost::shared_ptr task) = 0; - - static boost::shared_ptr newThreadManager(); - - /** - * Creates a simple thread manager the uses count number of worker threads and has - * a pendingTaskCountMax maximum pending tasks. The default, 0, specified no limit - * on pending tasks - */ - static boost::shared_ptr newSimpleThreadManager(size_t count=4, size_t pendingTaskCountMax=0); - - class Task; - - class Worker; - - class Impl; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_THREADMANAGER_H_ diff --git service/include/thrift/concurrency/TimerManager.h service/include/thrift/concurrency/TimerManager.h deleted file mode 100644 index dfbf0ea..0000000 --- service/include/thrift/concurrency/TimerManager.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_ -#define _THRIFT_CONCURRENCY_TIMERMANAGER_H_ 1 - -#include "Exception.h" -#include "Monitor.h" -#include "Thread.h" - -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Timer Manager - * - * This class dispatches timer tasks when they fall due. - * - * @version $Id:$ - */ -class TimerManager { - - public: - - TimerManager(); - - virtual ~TimerManager(); - - virtual boost::shared_ptr threadFactory() const; - - virtual void threadFactory(boost::shared_ptr value); - - /** - * Starts the timer manager service - * - * @throws IllegalArgumentException Missing thread factory attribute - */ - virtual void start(); - - /** - * Stops the timer manager service - */ - virtual void stop(); - - virtual size_t taskCount() const ; - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * @param task The task to execute - * @param timeout Time in milliseconds to delay before executing task - */ - virtual void add(boost::shared_ptr task, int64_t timeout); - - /** - * Adds a task to be executed at some time in the future by a worker thread. - * - * @param task The task to execute - * @param timeout Absolute time in the future to execute task. - */ - virtual void add(boost::shared_ptr task, const struct timespec& timeout); - - /** - * Removes a pending task - * - * @throws NoSuchTaskException Specified task doesn't exist. It was either - * processed already or this call was made for a - * task that was never added to this timer - * - * @throws UncancellableTaskException Specified task is already being - * executed or has completed execution. - */ - virtual void remove(boost::shared_ptr task); - - enum STATE { - UNINITIALIZED, - STARTING, - STARTED, - STOPPING, - STOPPED - }; - - virtual const STATE state() const; - - private: - boost::shared_ptr threadFactory_; - class Task; - friend class Task; - std::multimap > taskMap_; - size_t taskCount_; - Monitor monitor_; - STATE state_; - class Dispatcher; - friend class Dispatcher; - boost::shared_ptr dispatcher_; - boost::shared_ptr dispatcherThread_; - typedef std::multimap >::iterator task_iterator; - typedef std::pair task_range; -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_TIMERMANAGER_H_ diff --git service/include/thrift/concurrency/Util.h service/include/thrift/concurrency/Util.h deleted file mode 100644 index 25fcc20..0000000 --- service/include/thrift/concurrency/Util.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_CONCURRENCY_UTIL_H_ -#define _THRIFT_CONCURRENCY_UTIL_H_ 1 - -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace concurrency { - -/** - * Utility methods - * - * This class contains basic utility methods for converting time formats, - * and other common platform-dependent concurrency operations. - * It should not be included in API headers for other concurrency library - * headers, since it will, by definition, pull in all sorts of horrid - * platform dependent crap. Rather it should be inluded directly in - * concurrency library implementation source. - * - * @version $Id:$ - */ -class Util { - - static const int64_t NS_PER_S = 1000000000LL; - static const int64_t US_PER_S = 1000000LL; - static const int64_t MS_PER_S = 1000LL; - - static const int64_t NS_PER_MS = NS_PER_S / MS_PER_S; - static const int64_t US_PER_MS = US_PER_S / MS_PER_S; - - public: - - /** - * Converts millisecond timestamp into a timespec struct - * - * @param struct timespec& result - * @param time or duration in milliseconds - */ - static void toTimespec(struct timespec& result, int64_t value) { - result.tv_sec = value / MS_PER_S; // ms to s - result.tv_nsec = (value % MS_PER_S) * NS_PER_MS; // ms to ns - } - - static void toTimeval(struct timeval& result, int64_t value) { - result.tv_sec = value / MS_PER_S; // ms to s - result.tv_usec = (value % MS_PER_S) * US_PER_MS; // ms to us - } - - /** - * Converts struct timespec to milliseconds - */ - static const void toMilliseconds(int64_t& result, const struct timespec& value) { - result = (value.tv_sec * MS_PER_S) + (value.tv_nsec / NS_PER_MS); - // round up -- int64_t cast is to avoid a compiler error for some GCCs - if (int64_t(value.tv_nsec) % NS_PER_MS >= (NS_PER_MS / 2)) { - ++result; - } - } - - /** - * Converts struct timeval to milliseconds - */ - static const void toMilliseconds(int64_t& result, const struct timeval& value) { - result = (value.tv_sec * MS_PER_S) + (value.tv_usec / US_PER_MS); - // round up -- int64_t cast is to avoid a compiler error for some GCCs - if (int64_t(value.tv_usec) % US_PER_MS >= (US_PER_MS / 2)) { - ++result; - } - } - - /** - * Get current time as milliseconds from epoch - */ - static const int64_t currentTime(); -}; - -}}} // apache::thrift::concurrency - -#endif // #ifndef _THRIFT_CONCURRENCY_UTIL_H_ diff --git service/include/thrift/config.h service/include/thrift/config.h deleted file mode 100644 index 70264f2..0000000 --- service/include/thrift/config.h +++ /dev/null @@ -1,354 +0,0 @@ -/* config.h. Generated from config.hin by configure. */ -/* config.hin. Generated from configure.ac by autoheader. */ - -/* Define if the AI_ADDRCONFIG symbol is unavailable */ -/* #undef AI_ADDRCONFIG */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define ARITHMETIC_RIGHT_SHIFT 1 - -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -/* #undef CRAY_STACKSEG_END */ - -/* Define to 1 if using `alloca.c'. */ -/* #undef C_ALLOCA */ - -/* Define to 1 if you have `alloca', as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#define HAVE_ALLOCA_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* define if the Boost library is available */ -#define HAVE_BOOST /**/ - -/* Define to 1 if you have the `bzero' function. */ -#define HAVE_BZERO 1 - -/* Define to 1 if you have the `clock_gettime' function. */ -#define HAVE_CLOCK_GETTIME 1 - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#define HAVE_DECL_STRERROR_R 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ENDIAN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the `ftruncate' function. */ -#define HAVE_FTRUNCATE 1 - -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define to 1 if you have the `gettimeofday' function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* define if libevent is available */ -#define HAVE_LIBEVENT /**/ - -/* Define to 1 if you have the header file. */ -#define HAVE_LIBINTL_H 1 - -/* Define to 1 if you have the `pthread' library (-lpthread). */ -#define HAVE_LIBPTHREAD 1 - -/* Define to 1 if you have the `rt' library (-lrt). */ -#define HAVE_LIBRT 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define to 1 if you have the `memmove' function. */ -#define HAVE_MEMMOVE 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `memset' function. */ -#define HAVE_MEMSET 1 - -/* Define to 1 if you have the `mkdir' function. */ -#define HAVE_MKDIR 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 - -/* Define to 1 if the system has the type `ptrdiff_t'. */ -#define HAVE_PTRDIFF_T 1 - -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#define HAVE_REALLOC 1 - -/* Define to 1 if you have the `realpath' function. */ -#define HAVE_REALPATH 1 - -/* Define to 1 if you have the `sched_get_priority_max' function. */ -#define HAVE_SCHED_GET_PRIORITY_MAX 1 - -/* Define to 1 if you have the `sched_get_priority_min' function. */ -#define HAVE_SCHED_GET_PRIORITY_MIN 1 - -/* Define to 1 if you have the `select' function. */ -#define HAVE_SELECT 1 - -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - -/* Define to 1 if you have the `sqrt' function. */ -#define HAVE_SQRT 1 - -/* Define to 1 if `stat' has the bug that it succeeds when given the - zero-length file name argument. */ -/* #undef HAVE_STAT_EMPTY_STRING_BUG */ - -/* Define to 1 if stdbool.h conforms to C99. */ -#define HAVE_STDBOOL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strchr' function. */ -#define HAVE_STRCHR 1 - -/* Define to 1 if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the `strerror_r' function. */ -#define HAVE_STRERROR_R 1 - -/* Define to 1 if you have the `strftime' function. */ -#define HAVE_STRFTIME 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - -/* Define to 1 if you have the `strtol' function. */ -#define HAVE_STRTOL 1 - -/* Define to 1 if you have the `strtoul' function. */ -#define HAVE_STRTOUL 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to 1 if you have the `vprintf' function. */ -#define HAVE_VPRINTF 1 - -/* define if zlib is available */ -/* #undef HAVE_ZLIB */ - -/* Define to 1 if the system has the type `_Bool'. */ -/* #undef HAVE__BOOL */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define LOGICAL_RIGHT_SHIFT 2 - -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing - slash. */ -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Name of package */ -#define PACKAGE "thrift" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "thrift" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "thrift instant" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "thrift" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "instant" - -/* Define to the type of arg 1 for `select'. */ -#define SELECT_TYPE_ARG1 int - -/* Define to the type of args 2, 3 and 4 for `select'. */ -#define SELECT_TYPE_ARG234 (fd_set *) - -/* Define to the type of arg 5 for `select'. */ -#define SELECT_TYPE_ARG5 (struct timeval *) - -/* Indicates the effect of the right shift operator on negative signed - integers */ -#define SIGNED_RIGHT_SHIFT_IS 1 - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -/* #undef STACK_DIRECTION */ - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Define to 1 if strerror_r returns char *. */ -#define STRERROR_R_CHAR_P 1 - -/* Define to 1 if you can safely include both and . */ -#define TIME_WITH_SYS_TIME 1 - -/* Define to 1 if your declares `struct tm'. */ -/* #undef TM_IN_SYS_TIME */ - -/* Possible value for SIGNED_RIGHT_SHIFT_IS */ -#define UNKNOWN_RIGHT_SHIFT 3 - -/* Version number of package */ -#define VERSION "instant" - -/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a - `char[]'. */ -#define YYTEXT_POINTER 1 - -/* Define for Solaris 2.5.1 so the uint32_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT32_T */ - -/* Define for Solaris 2.5.1 so the uint64_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT64_T */ - -/* Define for Solaris 2.5.1 so the uint8_t typedef from , - , or is not used. If the typedef were allowed, the - #define below would cause a syntax error. */ -/* #undef _UINT8_T */ - -/* Define to empty if `const' does not conform to ANSI C. */ -/* #undef const */ - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -/* #undef inline */ -#endif - -/* Define to the type of a signed integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int16_t */ - -/* Define to the type of a signed integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int32_t */ - -/* Define to the type of a signed integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef int64_t */ - -/* Define to the type of a signed integer type of width exactly 8 bits if such - a type exists and the standard includes do not define it. */ -/* #undef int8_t */ - -/* Define to rpl_malloc if the replacement function should be used. */ -/* #undef malloc */ - -/* Define to `int' if does not define. */ -/* #undef mode_t */ - -/* Define to `long int' if does not define. */ -/* #undef off_t */ - -/* Define to rpl_realloc if the replacement function should be used. */ -/* #undef realloc */ - -/* Define to `unsigned int' if does not define. */ -/* #undef size_t */ - -/* Define to `int' if does not define. */ -/* #undef ssize_t */ - -/* Define to the type of an unsigned integer type of width exactly 16 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint16_t */ - -/* Define to the type of an unsigned integer type of width exactly 32 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint32_t */ - -/* Define to the type of an unsigned integer type of width exactly 64 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint64_t */ - -/* Define to the type of an unsigned integer type of width exactly 8 bits if - such a type exists and the standard includes do not define it. */ -/* #undef uint8_t */ - -/* Define to empty if the keyword `volatile' does not work. Warning: valid - code using `volatile' can become incorrect without. Disable with care. */ -/* #undef volatile */ diff --git service/include/thrift/fb303/FacebookBase.h service/include/thrift/fb303/FacebookBase.h deleted file mode 100644 index fd169e6..0000000 --- service/include/thrift/fb303/FacebookBase.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * 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. - */ - -#ifndef _FACEBOOK_TB303_FACEBOOKBASE_H_ -#define _FACEBOOK_TB303_FACEBOOKBASE_H_ 1 - -#include "FacebookService.h" - -#include "server/TServer.h" -#include "concurrency/Mutex.h" - -#include -#include -#include - -namespace facebook { namespace fb303 { - -using apache::thrift::concurrency::Mutex; -using apache::thrift::concurrency::ReadWriteMutex; -using apache::thrift::server::TServer; - -struct ReadWriteInt : ReadWriteMutex {int64_t value;}; -struct ReadWriteCounterMap : ReadWriteMutex, - std::map {}; - -/** - * Base Facebook service implementation in C++. - * - */ -class FacebookBase : virtual public FacebookServiceIf { - protected: - FacebookBase(std::string name); - virtual ~FacebookBase() {} - - public: - void getName(std::string& _return); - virtual void getVersion(std::string& _return) { _return = ""; } - - virtual fb_status getStatus() = 0; - virtual void getStatusDetails(std::string& _return) { _return = ""; } - - void setOption(const std::string& key, const std::string& value); - void getOption(std::string& _return, const std::string& key); - void getOptions(std::map & _return); - - int64_t aliveSince(); - - virtual void reinitialize() {} - - virtual void shutdown() { - if (server_.get() != NULL) { - server_->stop(); - } - } - - int64_t incrementCounter(const std::string& key, int64_t amount = 1); - int64_t setCounter(const std::string& key, int64_t value); - - void getCounters(std::map& _return); - int64_t getCounter(const std::string& key); - - /** - * Set server handle for shutdown method - */ - void setServer(boost::shared_ptr server) { - server_ = server; - } - - void getCpuProfile(std::string& _return, int32_t durSecs) { _return = ""; } - - private: - - std::string name_; - int64_t aliveSince_; - - std::map options_; - Mutex optionsLock_; - - ReadWriteCounterMap counters_; - - boost::shared_ptr server_; - -}; - -}} // facebook::tb303 - -#endif // _FACEBOOK_TB303_FACEBOOKBASE_H_ diff --git service/include/thrift/fb303/FacebookService.cpp service/include/thrift/fb303/FacebookService.cpp deleted file mode 100644 index 4a34362..0000000 --- service/include/thrift/fb303/FacebookService.cpp +++ /dev/null @@ -1,2887 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "FacebookService.h" - -namespace facebook { namespace fb303 { - -uint32_t FacebookService_getName_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getName_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getName_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getName_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getName_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getName_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getName_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getVersion_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getVersion_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getVersion_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getVersion_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getVersion_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatus_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatus_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_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_I32) { - int32_t ecast0; - xfer += iprot->readI32(ecast0); - this->success = (fb_status)ecast0; - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatus_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getStatus_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I32, 0); - xfer += oprot->writeI32((int32_t)this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatus_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_I32) { - int32_t ecast1; - xfer += iprot->readI32(ecast1); - (*(this->success)) = (fb_status)ecast1; - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getStatusDetails_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getStatusDetails_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getStatusDetails_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounters_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounters_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_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_MAP) { - { - this->success.clear(); - uint32_t _size2; - apache::thrift::protocol::TType _ktype3; - apache::thrift::protocol::TType _vtype4; - iprot->readMapBegin(_ktype3, _vtype4, _size2); - uint32_t _i6; - for (_i6 = 0; _i6 < _size2; ++_i6) - { - std::string _key7; - xfer += iprot->readString(_key7); - int64_t& _val8 = this->success[_key7]; - xfer += iprot->readI64(_val8); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounters_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCounters_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_I64, this->success.size()); - std::map ::const_iterator _iter9; - for (_iter9 = this->success.begin(); _iter9 != this->success.end(); ++_iter9) - { - xfer += oprot->writeString(_iter9->first); - xfer += oprot->writeI64(_iter9->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounters_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_MAP) { - { - (*(this->success)).clear(); - uint32_t _size10; - apache::thrift::protocol::TType _ktype11; - apache::thrift::protocol::TType _vtype12; - iprot->readMapBegin(_ktype11, _vtype12, _size10); - uint32_t _i14; - for (_i14 = 0; _i14 < _size10; ++_i14) - { - std::string _key15; - xfer += iprot->readString(_key15); - int64_t& _val16 = (*(this->success))[_key15]; - xfer += iprot->readI64(_val16); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_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->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounter_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCounter_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCounter_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCounter_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCounter_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_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->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->value); - this->__isset.value = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_setOption_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("value", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString(this->value); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_setOption_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("value", apache::thrift::protocol::T_STRING, 2); - xfer += oprot->writeString((*(this->value))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_setOption_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_setOption_result"); - - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_setOption_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_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->key); - this->__isset.key = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOption_args"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString(this->key); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOption_pargs"); - xfer += oprot->writeFieldBegin("key", apache::thrift::protocol::T_STRING, 1); - xfer += oprot->writeString((*(this->key))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOption_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getOption_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOption_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOptions_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getOptions_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_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_MAP) { - { - this->success.clear(); - uint32_t _size17; - apache::thrift::protocol::TType _ktype18; - apache::thrift::protocol::TType _vtype19; - iprot->readMapBegin(_ktype18, _vtype19, _size17); - uint32_t _i21; - for (_i21 = 0; _i21 < _size17; ++_i21) - { - std::string _key22; - xfer += iprot->readString(_key22); - std::string& _val23 = this->success[_key22]; - xfer += iprot->readString(_val23); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getOptions_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getOptions_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_MAP, 0); - { - xfer += oprot->writeMapBegin(apache::thrift::protocol::T_STRING, apache::thrift::protocol::T_STRING, this->success.size()); - std::map ::const_iterator _iter24; - for (_iter24 = this->success.begin(); _iter24 != this->success.end(); ++_iter24) - { - xfer += oprot->writeString(_iter24->first); - xfer += oprot->writeString(_iter24->second); - } - xfer += oprot->writeMapEnd(); - } - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getOptions_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_MAP) { - { - (*(this->success)).clear(); - uint32_t _size25; - apache::thrift::protocol::TType _ktype26; - apache::thrift::protocol::TType _vtype27; - iprot->readMapBegin(_ktype26, _vtype27, _size25); - uint32_t _i29; - for (_i29 = 0; _i29 < _size25; ++_i29) - { - std::string _key30; - xfer += iprot->readString(_key30); - std::string& _val31 = (*(this->success))[_key30]; - xfer += iprot->readString(_val31); - } - iprot->readMapEnd(); - } - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_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_I32) { - xfer += iprot->readI32(this->profileDurationInSec); - this->__isset.profileDurationInSec = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_args"); - xfer += oprot->writeFieldBegin("profileDurationInSec", apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32(this->profileDurationInSec); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_pargs"); - xfer += oprot->writeFieldBegin("profileDurationInSec", apache::thrift::protocol::T_I32, 1); - xfer += oprot->writeI32((*(this->profileDurationInSec))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_getCpuProfile_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_getCpuProfile_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); - xfer += oprot->writeString(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_getCpuProfile_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_aliveSince_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_aliveSince_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_aliveSince_result::write(apache::thrift::protocol::TProtocol* oprot) const { - - uint32_t xfer = 0; - - xfer += oprot->writeStructBegin("FacebookService_aliveSince_result"); - - if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_I64, 0); - xfer += oprot->writeI64(this->success); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_aliveSince_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; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_reinitialize_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_reinitialize_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_reinitialize_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_reinitialize_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_reinitialize_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_shutdown_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) - { - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t FacebookService_shutdown_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_shutdown_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t FacebookService_shutdown_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("FacebookService_shutdown_pargs"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -void FacebookServiceClient::getName(std::string& _return) -{ - send_getName(); - recv_getName(_return); -} - -void FacebookServiceClient::send_getName() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getName", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getName_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getName(std::string& _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getName") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getName_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getName failed: unknown result"); -} - -void FacebookServiceClient::getVersion(std::string& _return) -{ - send_getVersion(); - recv_getVersion(_return); -} - -void FacebookServiceClient::send_getVersion() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getVersion", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getVersion_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getVersion(std::string& _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getVersion") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getVersion_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getVersion failed: unknown result"); -} - -fb_status FacebookServiceClient::getStatus() -{ - send_getStatus(); - return recv_getStatus(); -} - -void FacebookServiceClient::send_getStatus() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getStatus", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getStatus_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -fb_status FacebookServiceClient::recv_getStatus() -{ - - 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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getStatus") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - fb_status _return; - FacebookService_getStatus_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getStatus failed: unknown result"); -} - -void FacebookServiceClient::getStatusDetails(std::string& _return) -{ - send_getStatusDetails(); - recv_getStatusDetails(_return); -} - -void FacebookServiceClient::send_getStatusDetails() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getStatusDetails_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getStatusDetails(std::string& _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getStatusDetails") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getStatusDetails_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getStatusDetails failed: unknown result"); -} - -void FacebookServiceClient::getCounters(std::map & _return) -{ - send_getCounters(); - recv_getCounters(_return); -} - -void FacebookServiceClient::send_getCounters() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCounters", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCounters_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getCounters(std::map & _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCounters") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getCounters_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCounters failed: unknown result"); -} - -int64_t FacebookServiceClient::getCounter(const std::string& key) -{ - send_getCounter(key); - return recv_getCounter(); -} - -void FacebookServiceClient::send_getCounter(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCounter", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCounter_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -int64_t FacebookServiceClient::recv_getCounter() -{ - - 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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCounter") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - int64_t _return; - FacebookService_getCounter_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCounter failed: unknown result"); -} - -void FacebookServiceClient::setOption(const std::string& key, const std::string& value) -{ - send_setOption(key, value); - recv_setOption(); -} - -void FacebookServiceClient::send_setOption(const std::string& key, const std::string& value) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("setOption", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_setOption_pargs args; - args.key = &key; - args.value = &value; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_setOption() -{ - - 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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("setOption") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_setOption_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - return; -} - -void FacebookServiceClient::getOption(std::string& _return, const std::string& key) -{ - send_getOption(key); - recv_getOption(_return); -} - -void FacebookServiceClient::send_getOption(const std::string& key) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getOption", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getOption_pargs args; - args.key = &key; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getOption(std::string& _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getOption") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getOption_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getOption failed: unknown result"); -} - -void FacebookServiceClient::getOptions(std::map & _return) -{ - send_getOptions(); - recv_getOptions(_return); -} - -void FacebookServiceClient::send_getOptions() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getOptions", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getOptions_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getOptions(std::map & _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getOptions") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getOptions_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getOptions failed: unknown result"); -} - -void FacebookServiceClient::getCpuProfile(std::string& _return, const int32_t profileDurationInSec) -{ - send_getCpuProfile(profileDurationInSec); - recv_getCpuProfile(_return); -} - -void FacebookServiceClient::send_getCpuProfile(const int32_t profileDurationInSec) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_getCpuProfile_pargs args; - args.profileDurationInSec = &profileDurationInSec; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::recv_getCpuProfile(std::string& _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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("getCpuProfile") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - FacebookService_getCpuProfile_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - // _return pointer has now been filled - return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getCpuProfile failed: unknown result"); -} - -int64_t FacebookServiceClient::aliveSince() -{ - send_aliveSince(); - return recv_aliveSince(); -} - -void FacebookServiceClient::send_aliveSince() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("aliveSince", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_aliveSince_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -int64_t FacebookServiceClient::recv_aliveSince() -{ - - 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(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("aliveSince") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - int64_t _return; - FacebookService_aliveSince_presult result; - result.success = &_return; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.success) { - return _return; - } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "aliveSince failed: unknown result"); -} - -void FacebookServiceClient::reinitialize() -{ - send_reinitialize(); -} - -void FacebookServiceClient::send_reinitialize() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("reinitialize", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_reinitialize_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void FacebookServiceClient::shutdown() -{ - send_shutdown(); -} - -void FacebookServiceClient::send_shutdown() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("shutdown", apache::thrift::protocol::T_CALL, cseqid); - - FacebookService_shutdown_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -bool FacebookServiceProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { - - apache::thrift::protocol::TProtocol* iprot = piprot.get(); - apache::thrift::protocol::TProtocol* oprot = poprot.get(); - std::string fname; - apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - iprot->readMessageBegin(fname, mtype, seqid); - - if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { - iprot->skip(apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return true; - } - - return process_fn(iprot, oprot, fname, seqid); -} - -bool FacebookServiceProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { - std::map::iterator pfn; - pfn = processMap_.find(fname); - if (pfn == processMap_.end()) { - iprot->skip(apache::thrift::protocol::T_STRUCT); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return true; - } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; -} - -void FacebookServiceProcessor::process_getName(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getName_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getName_result result; - try { - iface_->getName(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getName", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getName", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getVersion(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getVersion_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getVersion_result result; - try { - iface_->getVersion(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getVersion", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getVersion", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getStatus_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getStatus_result result; - try { - result.success = iface_->getStatus(); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getStatus", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getStatus", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getStatusDetails(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getStatusDetails_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getStatusDetails_result result; - try { - iface_->getStatusDetails(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getStatusDetails", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCounters(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCounters_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCounters_result result; - try { - iface_->getCounters(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCounters", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCounters", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCounter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCounter_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCounter_result result; - try { - result.success = iface_->getCounter(args.key); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCounter", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCounter", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_setOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_setOption_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_setOption_result result; - try { - iface_->setOption(args.key, args.value); - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("setOption", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("setOption", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getOption_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getOption_result result; - try { - iface_->getOption(result.success, args.key); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getOption", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getOption", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getOptions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getOptions_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getOptions_result result; - try { - iface_->getOptions(result.success); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getOptions", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getOptions", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_getCpuProfile(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_getCpuProfile_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_getCpuProfile_result result; - try { - iface_->getCpuProfile(result.success, args.profileDurationInSec); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("getCpuProfile", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_aliveSince(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_aliveSince_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - FacebookService_aliveSince_result result; - try { - result.success = iface_->aliveSince(); - result.__isset.success = true; - } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("aliveSince", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - oprot->writeMessageBegin("aliveSince", apache::thrift::protocol::T_REPLY, seqid); - result.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); -} - -void FacebookServiceProcessor::process_reinitialize(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_reinitialize_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - try { - iface_->reinitialize(); - } catch (const std::exception& e) { - } - return; -} - -void FacebookServiceProcessor::process_shutdown(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - FacebookService_shutdown_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - try { - iface_->shutdown(); - } catch (const std::exception& e) { - } - return; -} - -}} // namespace - diff --git service/include/thrift/fb303/FacebookService.h service/include/thrift/fb303/FacebookService.h deleted file mode 100644 index dcd843f..0000000 --- service/include/thrift/fb303/FacebookService.h +++ /dev/null @@ -1,1359 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef FacebookService_H -#define FacebookService_H - -#include -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -class FacebookServiceIf { - public: - virtual ~FacebookServiceIf() {} - virtual void getName(std::string& _return) = 0; - virtual void getVersion(std::string& _return) = 0; - virtual fb_status getStatus() = 0; - virtual void getStatusDetails(std::string& _return) = 0; - virtual void getCounters(std::map & _return) = 0; - virtual int64_t getCounter(const std::string& key) = 0; - virtual void setOption(const std::string& key, const std::string& value) = 0; - virtual void getOption(std::string& _return, const std::string& key) = 0; - virtual void getOptions(std::map & _return) = 0; - virtual void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) = 0; - virtual int64_t aliveSince() = 0; - virtual void reinitialize() = 0; - virtual void shutdown() = 0; -}; - -class FacebookServiceNull : virtual public FacebookServiceIf { - public: - virtual ~FacebookServiceNull() {} - void getName(std::string& /* _return */) { - return; - } - void getVersion(std::string& /* _return */) { - return; - } - fb_status getStatus() { - fb_status _return = (fb_status)0; - return _return; - } - void getStatusDetails(std::string& /* _return */) { - return; - } - void getCounters(std::map & /* _return */) { - return; - } - int64_t getCounter(const std::string& /* key */) { - int64_t _return = 0; - return _return; - } - void setOption(const std::string& /* key */, const std::string& /* value */) { - return; - } - void getOption(std::string& /* _return */, const std::string& /* key */) { - return; - } - void getOptions(std::map & /* _return */) { - return; - } - void getCpuProfile(std::string& /* _return */, const int32_t /* profileDurationInSec */) { - return; - } - int64_t aliveSince() { - int64_t _return = 0; - return _return; - } - void reinitialize() { - return; - } - void shutdown() { - return; - } -}; - -class FacebookService_getName_args { - public: - - FacebookService_getName_args() { - } - - virtual ~FacebookService_getName_args() throw() {} - - - bool operator == (const FacebookService_getName_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getName_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getName_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_pargs { - public: - - - virtual ~FacebookService_getName_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_result { - public: - - FacebookService_getName_result() : success("") { - } - - virtual ~FacebookService_getName_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getName_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getName_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getName_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getName_presult { - public: - - - virtual ~FacebookService_getName_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getVersion_args { - public: - - FacebookService_getVersion_args() { - } - - virtual ~FacebookService_getVersion_args() throw() {} - - - bool operator == (const FacebookService_getVersion_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getVersion_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getVersion_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_pargs { - public: - - - virtual ~FacebookService_getVersion_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_result { - public: - - FacebookService_getVersion_result() : success("") { - } - - virtual ~FacebookService_getVersion_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getVersion_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getVersion_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getVersion_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getVersion_presult { - public: - - - virtual ~FacebookService_getVersion_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getStatus_args { - public: - - FacebookService_getStatus_args() { - } - - virtual ~FacebookService_getStatus_args() throw() {} - - - bool operator == (const FacebookService_getStatus_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getStatus_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatus_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_pargs { - public: - - - virtual ~FacebookService_getStatus_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_result { - public: - - FacebookService_getStatus_result() { - } - - virtual ~FacebookService_getStatus_result() throw() {} - - fb_status success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getStatus_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getStatus_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatus_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatus_presult { - public: - - - virtual ~FacebookService_getStatus_presult() throw() {} - - fb_status* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getStatusDetails_args { - public: - - FacebookService_getStatusDetails_args() { - } - - virtual ~FacebookService_getStatusDetails_args() throw() {} - - - bool operator == (const FacebookService_getStatusDetails_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getStatusDetails_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatusDetails_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_pargs { - public: - - - virtual ~FacebookService_getStatusDetails_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_result { - public: - - FacebookService_getStatusDetails_result() : success("") { - } - - virtual ~FacebookService_getStatusDetails_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getStatusDetails_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getStatusDetails_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getStatusDetails_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getStatusDetails_presult { - public: - - - virtual ~FacebookService_getStatusDetails_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCounters_args { - public: - - FacebookService_getCounters_args() { - } - - virtual ~FacebookService_getCounters_args() throw() {} - - - bool operator == (const FacebookService_getCounters_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getCounters_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounters_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_pargs { - public: - - - virtual ~FacebookService_getCounters_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_result { - public: - - FacebookService_getCounters_result() { - } - - virtual ~FacebookService_getCounters_result() throw() {} - - std::map success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCounters_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCounters_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounters_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounters_presult { - public: - - - virtual ~FacebookService_getCounters_presult() throw() {} - - std::map * success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCounter_args { - public: - - FacebookService_getCounter_args() : key("") { - } - - virtual ~FacebookService_getCounter_args() throw() {} - - std::string key; - - struct __isset { - __isset() : key(false) {} - bool key; - } __isset; - - bool operator == (const FacebookService_getCounter_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const FacebookService_getCounter_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounter_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_pargs { - public: - - - virtual ~FacebookService_getCounter_pargs() throw() {} - - const std::string* key; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_result { - public: - - FacebookService_getCounter_result() : success(0) { - } - - virtual ~FacebookService_getCounter_result() throw() {} - - int64_t success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCounter_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCounter_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCounter_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCounter_presult { - public: - - - virtual ~FacebookService_getCounter_presult() throw() {} - - int64_t* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_setOption_args { - public: - - FacebookService_setOption_args() : key(""), value("") { - } - - virtual ~FacebookService_setOption_args() throw() {} - - std::string key; - std::string value; - - struct __isset { - __isset() : key(false), value(false) {} - bool key; - bool value; - } __isset; - - bool operator == (const FacebookService_setOption_args & rhs) const - { - if (!(key == rhs.key)) - return false; - if (!(value == rhs.value)) - return false; - return true; - } - bool operator != (const FacebookService_setOption_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_setOption_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_pargs { - public: - - - virtual ~FacebookService_setOption_pargs() throw() {} - - const std::string* key; - const std::string* value; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_result { - public: - - FacebookService_setOption_result() { - } - - virtual ~FacebookService_setOption_result() throw() {} - - - bool operator == (const FacebookService_setOption_result & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_setOption_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_setOption_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_setOption_presult { - public: - - - virtual ~FacebookService_setOption_presult() throw() {} - - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getOption_args { - public: - - FacebookService_getOption_args() : key("") { - } - - virtual ~FacebookService_getOption_args() throw() {} - - std::string key; - - struct __isset { - __isset() : key(false) {} - bool key; - } __isset; - - bool operator == (const FacebookService_getOption_args & rhs) const - { - if (!(key == rhs.key)) - return false; - return true; - } - bool operator != (const FacebookService_getOption_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOption_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_pargs { - public: - - - virtual ~FacebookService_getOption_pargs() throw() {} - - const std::string* key; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_result { - public: - - FacebookService_getOption_result() : success("") { - } - - virtual ~FacebookService_getOption_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getOption_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getOption_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOption_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOption_presult { - public: - - - virtual ~FacebookService_getOption_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getOptions_args { - public: - - FacebookService_getOptions_args() { - } - - virtual ~FacebookService_getOptions_args() throw() {} - - - bool operator == (const FacebookService_getOptions_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_getOptions_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOptions_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_pargs { - public: - - - virtual ~FacebookService_getOptions_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_result { - public: - - FacebookService_getOptions_result() { - } - - virtual ~FacebookService_getOptions_result() throw() {} - - std::map success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getOptions_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getOptions_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getOptions_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getOptions_presult { - public: - - - virtual ~FacebookService_getOptions_presult() throw() {} - - std::map * success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_getCpuProfile_args { - public: - - FacebookService_getCpuProfile_args() : profileDurationInSec(0) { - } - - virtual ~FacebookService_getCpuProfile_args() throw() {} - - int32_t profileDurationInSec; - - struct __isset { - __isset() : profileDurationInSec(false) {} - bool profileDurationInSec; - } __isset; - - bool operator == (const FacebookService_getCpuProfile_args & rhs) const - { - if (!(profileDurationInSec == rhs.profileDurationInSec)) - return false; - return true; - } - bool operator != (const FacebookService_getCpuProfile_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCpuProfile_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_pargs { - public: - - - virtual ~FacebookService_getCpuProfile_pargs() throw() {} - - const int32_t* profileDurationInSec; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_result { - public: - - FacebookService_getCpuProfile_result() : success("") { - } - - virtual ~FacebookService_getCpuProfile_result() throw() {} - - std::string success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_getCpuProfile_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_getCpuProfile_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_getCpuProfile_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_getCpuProfile_presult { - public: - - - virtual ~FacebookService_getCpuProfile_presult() throw() {} - - std::string* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_aliveSince_args { - public: - - FacebookService_aliveSince_args() { - } - - virtual ~FacebookService_aliveSince_args() throw() {} - - - bool operator == (const FacebookService_aliveSince_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_aliveSince_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_aliveSince_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_pargs { - public: - - - virtual ~FacebookService_aliveSince_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_result { - public: - - FacebookService_aliveSince_result() : success(0) { - } - - virtual ~FacebookService_aliveSince_result() throw() {} - - int64_t success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - bool operator == (const FacebookService_aliveSince_result & rhs) const - { - if (!(success == rhs.success)) - return false; - return true; - } - bool operator != (const FacebookService_aliveSince_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_aliveSince_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_aliveSince_presult { - public: - - - virtual ~FacebookService_aliveSince_presult() throw() {} - - int64_t* success; - - struct __isset { - __isset() : success(false) {} - bool success; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class FacebookService_reinitialize_args { - public: - - FacebookService_reinitialize_args() { - } - - virtual ~FacebookService_reinitialize_args() throw() {} - - - bool operator == (const FacebookService_reinitialize_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_reinitialize_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_reinitialize_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_reinitialize_pargs { - public: - - - virtual ~FacebookService_reinitialize_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_shutdown_args { - public: - - FacebookService_shutdown_args() { - } - - virtual ~FacebookService_shutdown_args() throw() {} - - - bool operator == (const FacebookService_shutdown_args & /* rhs */) const - { - return true; - } - bool operator != (const FacebookService_shutdown_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const FacebookService_shutdown_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookService_shutdown_pargs { - public: - - - virtual ~FacebookService_shutdown_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class FacebookServiceClient : virtual public FacebookServiceIf { - public: - FacebookServiceClient(boost::shared_ptr prot) : - piprot_(prot), - poprot_(prot) { - iprot_ = prot.get(); - oprot_ = prot.get(); - } - FacebookServiceClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : - piprot_(iprot), - poprot_(oprot) { - iprot_ = iprot.get(); - oprot_ = oprot.get(); - } - boost::shared_ptr getInputProtocol() { - return piprot_; - } - boost::shared_ptr getOutputProtocol() { - return poprot_; - } - void getName(std::string& _return); - void send_getName(); - void recv_getName(std::string& _return); - void getVersion(std::string& _return); - void send_getVersion(); - void recv_getVersion(std::string& _return); - fb_status getStatus(); - void send_getStatus(); - fb_status recv_getStatus(); - void getStatusDetails(std::string& _return); - void send_getStatusDetails(); - void recv_getStatusDetails(std::string& _return); - void getCounters(std::map & _return); - void send_getCounters(); - void recv_getCounters(std::map & _return); - int64_t getCounter(const std::string& key); - void send_getCounter(const std::string& key); - int64_t recv_getCounter(); - void setOption(const std::string& key, const std::string& value); - void send_setOption(const std::string& key, const std::string& value); - void recv_setOption(); - void getOption(std::string& _return, const std::string& key); - void send_getOption(const std::string& key); - void recv_getOption(std::string& _return); - void getOptions(std::map & _return); - void send_getOptions(); - void recv_getOptions(std::map & _return); - void getCpuProfile(std::string& _return, const int32_t profileDurationInSec); - void send_getCpuProfile(const int32_t profileDurationInSec); - void recv_getCpuProfile(std::string& _return); - int64_t aliveSince(); - void send_aliveSince(); - int64_t recv_aliveSince(); - void reinitialize(); - void send_reinitialize(); - void shutdown(); - void send_shutdown(); - protected: - boost::shared_ptr piprot_; - boost::shared_ptr poprot_; - apache::thrift::protocol::TProtocol* iprot_; - apache::thrift::protocol::TProtocol* oprot_; -}; - -class FacebookServiceProcessor : virtual public apache::thrift::TProcessor { - protected: - boost::shared_ptr iface_; - virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); - private: - std::map processMap_; - void process_getName(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getVersion(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getStatusDetails(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCounters(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCounter(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_setOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getOption(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getOptions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getCpuProfile(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_aliveSince(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_reinitialize(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_shutdown(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - public: - FacebookServiceProcessor(boost::shared_ptr iface) : - iface_(iface) { - processMap_["getName"] = &FacebookServiceProcessor::process_getName; - processMap_["getVersion"] = &FacebookServiceProcessor::process_getVersion; - processMap_["getStatus"] = &FacebookServiceProcessor::process_getStatus; - processMap_["getStatusDetails"] = &FacebookServiceProcessor::process_getStatusDetails; - processMap_["getCounters"] = &FacebookServiceProcessor::process_getCounters; - processMap_["getCounter"] = &FacebookServiceProcessor::process_getCounter; - processMap_["setOption"] = &FacebookServiceProcessor::process_setOption; - processMap_["getOption"] = &FacebookServiceProcessor::process_getOption; - processMap_["getOptions"] = &FacebookServiceProcessor::process_getOptions; - processMap_["getCpuProfile"] = &FacebookServiceProcessor::process_getCpuProfile; - processMap_["aliveSince"] = &FacebookServiceProcessor::process_aliveSince; - processMap_["reinitialize"] = &FacebookServiceProcessor::process_reinitialize; - processMap_["shutdown"] = &FacebookServiceProcessor::process_shutdown; - } - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); - virtual ~FacebookServiceProcessor() {} -}; - -class FacebookServiceMultiface : virtual public FacebookServiceIf { - public: - FacebookServiceMultiface(std::vector >& ifaces) : ifaces_(ifaces) { - } - virtual ~FacebookServiceMultiface() {} - protected: - std::vector > ifaces_; - FacebookServiceMultiface() {} - void add(boost::shared_ptr iface) { - ifaces_.push_back(iface); - } - public: - void getName(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getName(_return); - return; - } else { - ifaces_[i]->getName(_return); - } - } - } - - void getVersion(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getVersion(_return); - return; - } else { - ifaces_[i]->getVersion(_return); - } - } - } - - fb_status getStatus() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->getStatus(); - } else { - ifaces_[i]->getStatus(); - } - } - } - - void getStatusDetails(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getStatusDetails(_return); - return; - } else { - ifaces_[i]->getStatusDetails(_return); - } - } - } - - void getCounters(std::map & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getCounters(_return); - return; - } else { - ifaces_[i]->getCounters(_return); - } - } - } - - int64_t getCounter(const std::string& key) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->getCounter(key); - } else { - ifaces_[i]->getCounter(key); - } - } - } - - void setOption(const std::string& key, const std::string& value) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->setOption(key, value); - } - } - - void getOption(std::string& _return, const std::string& key) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getOption(_return, key); - return; - } else { - ifaces_[i]->getOption(_return, key); - } - } - } - - void getOptions(std::map & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getOptions(_return); - return; - } else { - ifaces_[i]->getOptions(_return); - } - } - } - - void getCpuProfile(std::string& _return, const int32_t profileDurationInSec) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getCpuProfile(_return, profileDurationInSec); - return; - } else { - ifaces_[i]->getCpuProfile(_return, profileDurationInSec); - } - } - } - - int64_t aliveSince() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - return ifaces_[i]->aliveSince(); - } else { - ifaces_[i]->aliveSince(); - } - } - } - - void reinitialize() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->reinitialize(); - } - } - - void shutdown() { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->shutdown(); - } - } - -}; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/ServiceTracker.h service/include/thrift/fb303/ServiceTracker.h deleted file mode 100644 index 9304386..0000000 --- service/include/thrift/fb303/ServiceTracker.h +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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. - */ - -/** - * ServiceTracker is a utility class for logging and timing service - * calls to a fb303 Thrift server. Currently, ServiceTracker offers - * the following features: - * - * . Logging of service method start, end (and duration), and - * optional steps in between. - * - * . Automatic check of server status via fb303::getStatus() - * with a ServiceException thrown if server not alive - * (at method start). - * - * . A periodic logged checkpoint reporting lifetime time, lifetime - * service count, and per-method statistics since the last checkpoint - * time (at method finish). - * - * . Export of fb303 counters for lifetime and checkpoint statistics - * (at method finish). - * - * . For TThreadPoolServers, a logged warning when all server threads - * are busy (at method start). (Must call setThreadManager() after - * ServiceTracker instantiation for this feature to be enabled.) - * - * Individual features may be enabled or disabled by arguments to the - * constructor. The constructor also accepts a pointer to a logging - * method -- if no pointer is passed, the tracker will log to stdout. - * - * ServiceTracker defines private methods for service start, finish, - * and step, which are designed to be accessed by instantiating a - * friend ServiceMethod object, as in the following example: - * - * #include - * class MyServiceHandler : virtual public MyServiceIf, - * public facebook::fb303::FacebookBase - * { - * public: - * MyServiceHandler::MyServiceHandler() : mServiceTracker(this) {} - * void MyServiceHandler::myServiceMethod(int userId) { - * // note: Instantiating a ServiceMethod object starts a timer - * // and tells the ServiceTracker to log the start. Might throw - * // a ServiceException. - * ServiceMethod serviceMethod(&mServiceTracker, - * "myServiceMethod", - * userId); - * ... - * // note: Calling the step method tells the ServiceTracker to - * // log the step, with a time elapsed since start. - * serviceMethod.step("post parsing, begin processing"); - * ... - * // note: When the ServiceMethod object goes out of scope, the - * // ServiceTracker will log the total elapsed time of the method. - * } - * ... - * private: - * ServiceTracker mServiceTracker; - * } - * - * The step() method call is optional; the startService() and - * finishService() methods are handled by the object's constructor and - * destructor. - * - * The ServiceTracker is (intended to be) thread-safe. - * - * Future: - * - * . Come up with something better for logging than passing a - * function pointer to the constructor. - * - * . Add methods for tracking errors from service methods, e.g. - * ServiceTracker::reportService(). - */ - -#ifndef SERVICETRACKER_H -#define SERVICETRACKER_H - - -#include -#include -#include -#include -#include -#include - -#include "concurrency/Mutex.h" - - -namespace apache { namespace thrift { namespace concurrency { - class ThreadManager; -}}} - - -namespace facebook { namespace fb303 { - - -class FacebookBase; -class ServiceMethod; - - -class Stopwatch -{ -public: - enum Unit { UNIT_SECONDS, UNIT_MILLISECONDS, UNIT_MICROSECONDS }; - Stopwatch(); - uint64_t elapsedUnits(Unit unit, std::string *label = NULL) const; - void reset(); -private: - timeval startTime_; -}; - - -class ServiceTracker -{ - friend class ServiceMethod; - -public: - - static uint64_t CHECKPOINT_MINIMUM_INTERVAL_SECONDS; - static int LOG_LEVEL; - - ServiceTracker(facebook::fb303::FacebookBase *handler, - void (*logMethod)(int, const std::string &) - = &ServiceTracker::defaultLogMethod, - bool featureCheckpoint = true, - bool featureStatusCheck = true, - bool featureThreadCheck = true, - Stopwatch::Unit stopwatchUnit - = Stopwatch::UNIT_MILLISECONDS); - - void setThreadManager(boost::shared_ptr threadManager); - -private: - - facebook::fb303::FacebookBase *handler_; - void (*logMethod_)(int, const std::string &); - boost::shared_ptr threadManager_; - - bool featureCheckpoint_; - bool featureStatusCheck_; - bool featureThreadCheck_; - Stopwatch::Unit stopwatchUnit_; - - apache::thrift::concurrency::Mutex statisticsMutex_; - time_t checkpointTime_; - uint64_t checkpointServices_; - uint64_t checkpointDuration_; - std::map > checkpointServiceDuration_; - - void startService(const ServiceMethod &serviceMethod); - int64_t stepService(const ServiceMethod &serviceMethod, - const std::string &stepName); - void finishService(const ServiceMethod &serviceMethod); - void reportCheckpoint(); - static void defaultLogMethod(int level, const std::string &message); -}; - - -class ServiceMethod -{ - friend class ServiceTracker; -public: - ServiceMethod(ServiceTracker *tracker, - const std::string &name, - const std::string &signature, - bool featureLogOnly = false); - ServiceMethod(ServiceTracker *tracker, - const std::string &name, - uint64_t id, - bool featureLogOnly = false); - ~ServiceMethod(); - uint64_t step(const std::string &stepName); -private: - ServiceTracker *tracker_; - std::string name_; - std::string signature_; - bool featureLogOnly_; - Stopwatch timer_; -}; - - -class ServiceException : public std::exception -{ -public: - explicit ServiceException(const std::string &message, int code = 0) - : message_(message), code_(code) {} - ~ServiceException() throw() {} - virtual const char *what() const throw() { return message_.c_str(); } - int code() const throw() { return code_; } -private: - std::string message_; - int code_; -}; - - -}} // facebook::fb303 - -#endif diff --git service/include/thrift/fb303/fb303_constants.cpp service/include/thrift/fb303/fb303_constants.cpp deleted file mode 100644 index 66b8782..0000000 --- service/include/thrift/fb303/fb303_constants.cpp +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "fb303_constants.h" - -namespace facebook { namespace fb303 { - -const fb303Constants g_fb303_constants; - -fb303Constants::fb303Constants() { -} - -}} // namespace - diff --git service/include/thrift/fb303/fb303_constants.h service/include/thrift/fb303/fb303_constants.h deleted file mode 100644 index 19405bc..0000000 --- service/include/thrift/fb303/fb303_constants.h +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef fb303_CONSTANTS_H -#define fb303_CONSTANTS_H - -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -class fb303Constants { - public: - fb303Constants(); - -}; - -extern const fb303Constants g_fb303_constants; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/fb303_types.cpp service/include/thrift/fb303/fb303_types.cpp deleted file mode 100644 index f290125..0000000 --- service/include/thrift/fb303/fb303_types.cpp +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "fb303_types.h" - -namespace facebook { namespace fb303 { - -}} // namespace diff --git service/include/thrift/fb303/fb303_types.h service/include/thrift/fb303/fb303_types.h deleted file mode 100644 index 18936f9..0000000 --- service/include/thrift/fb303/fb303_types.h +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef fb303_TYPES_H -#define fb303_TYPES_H - -#include -#include -#include - - - -namespace facebook { namespace fb303 { - -enum fb_status { - DEAD = 0, - STARTING = 1, - ALIVE = 2, - STOPPING = 3, - STOPPED = 4, - WARNING = 5 -}; - -}} // namespace - -#endif diff --git service/include/thrift/fb303/if/fb303.thrift service/include/thrift/fb303/if/fb303.thrift deleted file mode 100644 index 66c8315..0000000 --- service/include/thrift/fb303/if/fb303.thrift +++ /dev/null @@ -1,112 +0,0 @@ -/* - * 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. - */ - -/** - * fb303.thrift - */ - -namespace java com.facebook.fb303 -namespace cpp facebook.fb303 -namespace perl Facebook.FB303 - -/** - * Common status reporting mechanism across all services - */ -enum fb_status { - DEAD = 0, - STARTING = 1, - ALIVE = 2, - STOPPING = 3, - STOPPED = 4, - WARNING = 5, -} - -/** - * Standard base service - */ -service FacebookService { - - /** - * Returns a descriptive name of the service - */ - string getName(), - - /** - * Returns the version of the service - */ - string getVersion(), - - /** - * Gets the status of this service - */ - fb_status getStatus(), - - /** - * User friendly description of status, such as why the service is in - * the dead or warning state, or what is being started or stopped. - */ - string getStatusDetails(), - - /** - * Gets the counters for this service - */ - map getCounters(), - - /** - * Gets the value of a single counter - */ - i64 getCounter(1: string key), - - /** - * Sets an option - */ - void setOption(1: string key, 2: string value), - - /** - * Gets an option - */ - string getOption(1: string key), - - /** - * Gets all options - */ - map getOptions(), - - /** - * Returns a CPU profile over the given time interval (client and server - * must agree on the profile format). - */ - string getCpuProfile(1: i32 profileDurationInSec), - - /** - * Returns the unix time that the server has been running since - */ - i64 aliveSince(), - - /** - * Tell the server to reload its configuration, reopen log files, etc - */ - oneway void reinitialize(), - - /** - * Suggest a shutdown to the server - */ - oneway void shutdown(), - -} diff --git service/include/thrift/if/reflection_limited.thrift service/include/thrift/if/reflection_limited.thrift deleted file mode 100644 index 993c46e..0000000 --- service/include/thrift/if/reflection_limited.thrift +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/local/bin/thrift -php -java -cpp -py - -// NOTICE!!! -// DO NOT FORGET to run regen.sh if you change this file -// (or if you change the compiler). - -// This interface is deprecated. -// There is no replacement yet, but I hate it so much that -// I'm deprecating it before it's done. -// @author I'm too ashamed to say. - -// dreiss naively thinks he knows how to do this better, -// so talk to him if you are interested in taking it on, -// or if you just want someone to make it better for you. - -namespace cpp facebook.thrift.reflection.limited -namespace java com.facebook.thrift.reflection.limited -namespace py thrift.reflection.limited - -enum TTypeTag { - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I16 = 6, - T_I32 = 8, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - // This doesn't exist in TBinaryProtocol, but it could be useful for reflection. - T_ENUM = 101, - T_NOT_REFLECTED = 102, -} - -struct SimpleType { - 1: TTypeTag ttype, - 2: string name, // For structs and emums. -} - -struct ContainerType { - 1: TTypeTag ttype, - 2: SimpleType subtype1, - 3: optional SimpleType subtype2, -} - -struct ThriftType { - 1: bool is_container, - 2: optional SimpleType simple_type, - 3: optional ContainerType container_type, -} - -struct Argument { - 1: i16 key, - 2: string name, - 3: ThriftType type, -} - -struct Method { - 1: string name, - 2: ThriftType return_type, - 3: list arguments, -} - -struct Service { - 1: string name, - 2: list methods, - 3: bool fully_reflected, -} diff --git service/include/thrift/processor/PeekProcessor.h service/include/thrift/processor/PeekProcessor.h deleted file mode 100644 index 0f7c016..0000000 --- service/include/thrift/processor/PeekProcessor.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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. - */ - -#ifndef PEEKPROCESSOR_H -#define PEEKPROCESSOR_H - -#include -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace processor { - -/* - * Class for peeking at the raw data that is being processed by another processor - * and gives the derived class a chance to change behavior accordingly - * - */ -class PeekProcessor : public apache::thrift::TProcessor { - - public: - PeekProcessor(); - virtual ~PeekProcessor(); - - // Input here: actualProcessor - the underlying processor - // protocolFactory - the protocol factory used to wrap the memory buffer - // transportFactory - this TPipedTransportFactory is used to wrap the source transport - // via a call to getPipedTransport - void initialize(boost::shared_ptr actualProcessor, - boost::shared_ptr protocolFactory, - boost::shared_ptr transportFactory); - - boost::shared_ptr getPipedTransport(boost::shared_ptr in); - - void setTargetTransport(boost::shared_ptr targetTransport); - - virtual bool process(boost::shared_ptr in, - boost::shared_ptr out); - - // The following three functions can be overloaded by child classes to - // achieve desired peeking behavior - virtual void peekName(const std::string& fname); - virtual void peekBuffer(uint8_t* buffer, uint32_t size); - virtual void peek(boost::shared_ptr in, - apache::thrift::protocol::TType ftype, - int16_t fid); - virtual void peekEnd(); - - private: - boost::shared_ptr actualProcessor_; - boost::shared_ptr pipedProtocol_; - boost::shared_ptr transportFactory_; - boost::shared_ptr memoryBuffer_; - boost::shared_ptr targetTransport_; -}; - -}}} // apache::thrift::processor - -#endif diff --git service/include/thrift/processor/StatsProcessor.h service/include/thrift/processor/StatsProcessor.h deleted file mode 100644 index 820b3ad..0000000 --- service/include/thrift/processor/StatsProcessor.h +++ /dev/null @@ -1,264 +0,0 @@ -/* - * 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. - */ - -#ifndef STATSPROCESSOR_H -#define STATSPROCESSOR_H - -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace processor { - -/* - * Class for keeping track of function call statistics and printing them if desired - * - */ -class StatsProcessor : public apache::thrift::TProcessor { -public: - StatsProcessor(bool print, bool frequency) - : print_(print), - frequency_(frequency) - {} - virtual ~StatsProcessor() {}; - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot) { - - piprot_ = piprot; - - std::string fname; - apache::thrift::protocol::TMessageType mtype; - int32_t seqid; - - piprot_->readMessageBegin(fname, mtype, seqid); - if (mtype != apache::thrift::protocol::T_CALL) { - if (print_) { - printf("Unknown message type\n"); - } - throw apache::thrift::TException("Unexpected message type"); - } - if (print_) { - printf("%s (", fname.c_str()); - } - if (frequency_) { - if (frequency_map_.find(fname) != frequency_map_.end()) { - frequency_map_[fname]++; - } else { - frequency_map_[fname] = 1; - } - } - - apache::thrift::protocol::TType ftype; - int16_t fid; - - while (true) { - piprot_->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - - printAndPassToBuffer(ftype); - if (print_) { - printf(", "); - } - } - - if (print_) { - printf("\b\b)\n"); - } - return true; - } - - const std::map& get_frequency_map() { - return frequency_map_; - } - -protected: - void printAndPassToBuffer(apache::thrift::protocol::TType ftype) { - switch (ftype) { - case apache::thrift::protocol::T_BOOL: - { - bool boolv; - piprot_->readBool(boolv); - if (print_) { - printf("%d", boolv); - } - } - break; - case apache::thrift::protocol::T_BYTE: - { - int8_t bytev; - piprot_->readByte(bytev); - if (print_) { - printf("%d", bytev); - } - } - break; - case apache::thrift::protocol::T_I16: - { - int16_t i16; - piprot_->readI16(i16); - if (print_) { - printf("%d", i16); - } - } - break; - case apache::thrift::protocol::T_I32: - { - int32_t i32; - piprot_->readI32(i32); - if (print_) { - printf("%d", i32); - } - } - break; - case apache::thrift::protocol::T_I64: - { - int64_t i64; - piprot_->readI64(i64); - if (print_) { - printf("%ld", i64); - } - } - break; - case apache::thrift::protocol::T_DOUBLE: - { - double dub; - piprot_->readDouble(dub); - if (print_) { - printf("%f", dub); - } - } - break; - case apache::thrift::protocol::T_STRING: - { - std::string str; - piprot_->readString(str); - if (print_) { - printf("%s", str.c_str()); - } - } - break; - case apache::thrift::protocol::T_STRUCT: - { - std::string name; - int16_t fid; - apache::thrift::protocol::TType ftype; - piprot_->readStructBegin(name); - if (print_) { - printf("<"); - } - while (true) { - piprot_->readFieldBegin(name, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - printAndPassToBuffer(ftype); - if (print_) { - printf(","); - } - piprot_->readFieldEnd(); - } - piprot_->readStructEnd(); - if (print_) { - printf("\b>"); - } - } - break; - case apache::thrift::protocol::T_MAP: - { - apache::thrift::protocol::TType keyType; - apache::thrift::protocol::TType valType; - uint32_t i, size; - piprot_->readMapBegin(keyType, valType, size); - if (print_) { - printf("{"); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(keyType); - if (print_) { - printf("=>"); - } - printAndPassToBuffer(valType); - if (print_) { - printf(","); - } - } - piprot_->readMapEnd(); - if (print_) { - printf("\b}"); - } - } - break; - case apache::thrift::protocol::T_SET: - { - apache::thrift::protocol::TType elemType; - uint32_t i, size; - piprot_->readSetBegin(elemType, size); - if (print_) { - printf("{"); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(elemType); - if (print_) { - printf(","); - } - } - piprot_->readSetEnd(); - if (print_) { - printf("\b}"); - } - } - break; - case apache::thrift::protocol::T_LIST: - { - apache::thrift::protocol::TType elemType; - uint32_t i, size; - piprot_->readListBegin(elemType, size); - if (print_) { - printf("["); - } - for (i = 0; i < size; i++) { - printAndPassToBuffer(elemType); - if (print_) { - printf(","); - } - } - piprot_->readListEnd(); - if (print_) { - printf("\b]"); - } - } - break; - default: - break; - } - } - - boost::shared_ptr piprot_; - std::map frequency_map_; - - bool print_; - bool frequency_; -}; - -}}} // apache::thrift::processor - -#endif diff --git service/include/thrift/protocol/TBase64Utils.h service/include/thrift/protocol/TBase64Utils.h deleted file mode 100644 index 3def733..0000000 --- service/include/thrift/protocol/TBase64Utils.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TBASE64UTILS_H_ -#define _THRIFT_PROTOCOL_TBASE64UTILS_H_ - -#include -#include - -namespace apache { namespace thrift { namespace protocol { - -// in must be at least len bytes -// len must be 1, 2, or 3 -// buf must be a buffer of at least 4 bytes and may not overlap in -// the data is not padded with '='; the caller can do this if desired -void base64_encode(const uint8_t *in, uint32_t len, uint8_t *buf); - -// buf must be a buffer of at least 4 bytes and contain base64 encoded values -// buf will be changed to contain output bytes -// len is number of bytes to consume from input (must be 2, 3, or 4) -// no '=' padding should be included in the input -void base64_decode(uint8_t *buf, uint32_t len); - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TBASE64UTILS_H_ diff --git service/include/thrift/protocol/TBinaryProtocol.h service/include/thrift/protocol/TBinaryProtocol.h deleted file mode 100644 index 7fd3de6..0000000 --- service/include/thrift/protocol/TBinaryProtocol.h +++ /dev/null @@ -1,254 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * The default binary protocol for thrift. Writes all data in a very basic - * binary format, essentially just spitting out the raw bytes. - * - */ -class TBinaryProtocol : public TProtocol { - protected: - static const int32_t VERSION_MASK = 0xffff0000; - static const int32_t VERSION_1 = 0x80010000; - // VERSION_2 (0x80020000) is taken by TDenseProtocol. - - public: - TBinaryProtocol(boost::shared_ptr trans) : - TProtocol(trans), - string_limit_(0), - container_limit_(0), - strict_read_(false), - strict_write_(true), - string_buf_(NULL), - string_buf_size_(0) {} - - TBinaryProtocol(boost::shared_ptr trans, - int32_t string_limit, - int32_t container_limit, - bool strict_read, - bool strict_write) : - TProtocol(trans), - string_limit_(string_limit), - container_limit_(container_limit), - strict_read_(strict_read), - strict_write_(strict_write), - string_buf_(NULL), - string_buf_size_(0) {} - - ~TBinaryProtocol() { - if (string_buf_ != NULL) { - std::free(string_buf_); - string_buf_size_ = 0; - } - } - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - void setStrict(bool strict_read, bool strict_write) { - strict_read_ = strict_read; - strict_write_ = strict_write; - } - - /** - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * Reading functions - */ - - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - protected: - uint32_t readStringBody(std::string& str, int32_t sz); - - int32_t string_limit_; - int32_t container_limit_; - - // Enforce presence of version identifier - bool strict_read_; - bool strict_write_; - - // Buffer for reading strings, save for the lifetime of the protocol to - // avoid memory churn allocating memory on every string read - uint8_t* string_buf_; - int32_t string_buf_size_; - -}; - -/** - * Constructs binary protocol handlers - */ -class TBinaryProtocolFactory : public TProtocolFactory { - public: - TBinaryProtocolFactory() : - string_limit_(0), - container_limit_(0), - strict_read_(false), - strict_write_(true) {} - - TBinaryProtocolFactory(int32_t string_limit, int32_t container_limit, bool strict_read, bool strict_write) : - string_limit_(string_limit), - container_limit_(container_limit), - strict_read_(strict_read), - strict_write_(strict_write) {} - - virtual ~TBinaryProtocolFactory() {} - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - void setStrict(bool strict_read, bool strict_write) { - strict_read_ = strict_read; - strict_write_ = strict_write; - } - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TBinaryProtocol(trans, string_limit_, container_limit_, strict_read_, strict_write_)); - } - - private: - int32_t string_limit_; - int32_t container_limit_; - bool strict_read_; - bool strict_write_; - -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ diff --git service/include/thrift/protocol/TCompactProtocol.h service/include/thrift/protocol/TCompactProtocol.h deleted file mode 100644 index b4e06f0..0000000 --- service/include/thrift/protocol/TCompactProtocol.h +++ /dev/null @@ -1,279 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TCOMPACTPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * C++ Implementation of the Compact Protocol as described in THRIFT-110 - */ -class TCompactProtocol : public TProtocol { - - protected: - static const int8_t PROTOCOL_ID = 0x82; - static const int8_t VERSION_N = 1; - static const int8_t VERSION_MASK = 0x1f; // 0001 1111 - static const int8_t TYPE_MASK = 0xE0; // 1110 0000 - static const int32_t TYPE_SHIFT_AMOUNT = 5; - - /** - * (Writing) If we encounter a boolean field begin, save the TField here - * so it can have the value incorporated. - */ - struct { - const char* name; - TType fieldType; - int16_t fieldId; - } booleanField_; - - /** - * (Reading) If we read a field header, and it's a boolean field, save - * the boolean value here so that readBool can use it. - */ - struct { - bool hasBoolValue; - bool boolValue; - } boolValue_; - - /** - * Used to keep track of the last field for the current and previous structs, - * so we can do the delta stuff. - */ - - std::stack lastField_; - int16_t lastFieldId_; - - enum Types { - CT_STOP = 0x00, - CT_BOOLEAN_TRUE = 0x01, - CT_BOOLEAN_FALSE = 0x02, - CT_BYTE = 0x03, - CT_I16 = 0x04, - CT_I32 = 0x05, - CT_I64 = 0x06, - CT_DOUBLE = 0x07, - CT_BINARY = 0x08, - CT_LIST = 0x09, - CT_SET = 0x0A, - CT_MAP = 0x0B, - CT_STRUCT = 0x0C, - }; - - static const int8_t TTypeToCType[16]; - - public: - TCompactProtocol(boost::shared_ptr trans) : - TProtocol(trans), - lastFieldId_(0), - string_limit_(0), - string_buf_(NULL), - string_buf_size_(0), - container_limit_(0) { - booleanField_.name = NULL; - boolValue_.hasBoolValue = false; - } - - TCompactProtocol(boost::shared_ptr trans, - int32_t string_limit, - int32_t container_limit) : - TProtocol(trans), - lastFieldId_(0), - string_limit_(string_limit), - string_buf_(NULL), - string_buf_size_(0), - container_limit_(container_limit) { - booleanField_.name = NULL; - boolValue_.hasBoolValue = false; - } - - - - /** - * Writing functions - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldStop(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * These methods are called by structs, but don't actually have any wired - * output or purpose - */ - virtual uint32_t writeMessageEnd() { return 0; } - uint32_t writeMapEnd() { return 0; } - uint32_t writeListEnd() { return 0; } - uint32_t writeSetEnd() { return 0; } - uint32_t writeFieldEnd() { return 0; } - - protected: - int32_t writeFieldBeginInternal(const char* name, - const TType fieldType, - const int16_t fieldId, - int8_t typeOverride); - uint32_t writeCollectionBegin(int8_t elemType, int32_t size); - uint32_t writeVarint32(uint32_t n); - uint32_t writeVarint64(uint64_t n); - uint64_t i64ToZigzag(const int64_t l); - uint32_t i32ToZigzag(const int32_t n); - inline int8_t getCompactType(int8_t ttype); - - public: - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - /* - *These methods are here for the struct to call, but don't have any wire - * encoding. - */ - uint32_t readMessageEnd() { return 0; } - uint32_t readFieldEnd() { return 0; } - uint32_t readMapEnd() { return 0; } - uint32_t readListEnd() { return 0; } - uint32_t readSetEnd() { return 0; } - - protected: - uint32_t readVarint32(int32_t& i32); - uint32_t readVarint64(int64_t& i64); - int32_t zigzagToI32(uint32_t n); - int64_t zigzagToI64(uint64_t n); - TType getTType(int8_t type); - - // Buffer for reading strings, save for the lifetime of the protocol to - // avoid memory churn allocating memory on every string read - int32_t string_limit_; - uint8_t* string_buf_; - int32_t string_buf_size_; - int32_t container_limit_; -}; - -/** - * Constructs compact protocol handlers - */ -class TCompactProtocolFactory : public TProtocolFactory { - public: - TCompactProtocolFactory() : - string_limit_(0), - container_limit_(0) {} - - TCompactProtocolFactory(int32_t string_limit, int32_t container_limit) : - string_limit_(string_limit), - container_limit_(container_limit) {} - - virtual ~TCompactProtocolFactory() {} - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setContainerSizeLimit(int32_t container_limit) { - container_limit_ = container_limit; - } - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TCompactProtocol(trans, string_limit_, container_limit_)); - } - - private: - int32_t string_limit_; - int32_t container_limit_; - -}; - -}}} // apache::thrift::protocol - -#endif diff --git service/include/thrift/protocol/TDebugProtocol.h service/include/thrift/protocol/TDebugProtocol.h deleted file mode 100644 index ab69e0c..0000000 --- service/include/thrift/protocol/TDebugProtocol.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ 1 - -#include "TProtocol.h" -#include "TOneWayProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -/* - -!!! EXPERIMENTAL CODE !!! - -This protocol is very much a work in progress. -It doesn't handle many cases properly. -It throws exceptions in many cases. -It probably segfaults in many cases. -Bug reports and feature requests are welcome. -Complaints are not. :R - -*/ - - -/** - * Protocol that prints the payload in a nice human-readable format. - * Reading from this protocol is not supported. - * - */ -class TDebugProtocol : public TWriteOnlyProtocol { - private: - enum write_state_t - { UNINIT - , STRUCT - , LIST - , SET - , MAP_KEY - , MAP_VALUE - }; - - public: - TDebugProtocol(boost::shared_ptr trans) - : TWriteOnlyProtocol(trans, "TDebugProtocol") - , string_limit_(DEFAULT_STRING_LIMIT) - , string_prefix_size_(DEFAULT_STRING_PREFIX_SIZE) - { - write_state_.push_back(UNINIT); - } - - static const int32_t DEFAULT_STRING_LIMIT = 256; - static const int32_t DEFAULT_STRING_PREFIX_SIZE = 16; - - void setStringSizeLimit(int32_t string_limit) { - string_limit_ = string_limit; - } - - void setStringPrefixSize(int32_t string_prefix_size) { - string_prefix_size_ = string_prefix_size; - } - - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - - private: - void indentUp(); - void indentDown(); - uint32_t writePlain(const std::string& str); - uint32_t writeIndented(const std::string& str); - uint32_t startItem(); - uint32_t endItem(); - uint32_t writeItem(const std::string& str); - - static std::string fieldTypeName(TType type); - - int32_t string_limit_; - int32_t string_prefix_size_; - - std::string indent_str_; - static const int indent_inc = 2; - - std::vector write_state_; - std::vector list_idx_; -}; - -/** - * Constructs debug protocol handlers - */ -class TDebugProtocolFactory : public TProtocolFactory { - public: - TDebugProtocolFactory() {} - virtual ~TDebugProtocolFactory() {} - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TDebugProtocol(trans)); - } - -}; - -}}} // apache::thrift::protocol - - -// TODO(dreiss): Move (part of) ThriftDebugString into a .cpp file and remove this. -#include - -namespace apache { namespace thrift { - -template -std::string ThriftDebugString(const ThriftStruct& ts) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TDebugProtocol protocol(trans); - - ts.write(&protocol); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} - -// TODO(dreiss): This is badly broken. Don't use it unless you are me. -#if 0 -template -std::string DebugString(const std::vector& vec) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TDebugProtocol protocol(trans); - - // I am gross! - protocol.writeStructBegin("SomeRandomVector"); - - // TODO: Fix this with a trait. - protocol.writeListBegin((TType)99, vec.size()); - typename std::vector::const_iterator it; - for (it = vec.begin(); it != vec.end(); ++it) { - it->write(&protocol); - } - protocol.writeListEnd(); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} -#endif // 0 - -}} // apache::thrift - - -#endif // #ifndef _THRIFT_PROTOCOL_TDEBUGPROTOCOL_H_ - - diff --git service/include/thrift/protocol/TDenseProtocol.h service/include/thrift/protocol/TDenseProtocol.h deleted file mode 100644 index 7655a47..0000000 --- service/include/thrift/protocol/TDenseProtocol.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ 1 - -#include "TBinaryProtocol.h" - -namespace apache { namespace thrift { namespace protocol { - -/** - * !!!WARNING!!! - * This class is still highly experimental. Incompatible changes - * WILL be made to it without notice. DO NOT USE IT YET unless - * you are coordinating your testing with the author. - * - * The dense protocol is designed to use as little space as possible. - * - * There are two types of dense protocol instances. Standalone instances - * are not used for RPC and just encoded and decode structures of - * a predetermined type. Non-standalone instances are used for RPC. - * Currently, only standalone instances exist. - * - * To use a standalone dense protocol object, you must set the type_spec - * property (either in the constructor, or with setTypeSpec) to the local - * reflection TypeSpec of the structures you will write to (or read from) the - * protocol instance. - * - * BEST PRACTICES: - * - Never use optional for primitives or containers. - * - Only use optional for structures if they are very big and very rarely set. - * - All integers are variable-length, so you can use i64 without bloating. - * - NEVER EVER change the struct definitions IN ANY WAY without either - * changing your cache keys or talking to dreiss. - * - * TODO(dreiss): New class write with old meta. - * - * We override all of TBinaryProtocol's methods. - * We inherit so that we can can explicitly call TBPs's primitive-writing - * methods within our versions. - * - */ -class TDenseProtocol : public TBinaryProtocol { - protected: - static const int32_t VERSION_MASK = 0xffff0000; - // VERSION_1 (0x80010000) is taken by TBinaryProtocol. - static const int32_t VERSION_2 = 0x80020000; - - public: - typedef apache::thrift::reflection::local::TypeSpec TypeSpec; - static const int FP_PREFIX_LEN; - - /** - * @param tran The transport to use. - * @param type_spec The TypeSpec of the structures using this protocol. - */ - TDenseProtocol(boost::shared_ptr trans, - TypeSpec* type_spec = NULL) : - TBinaryProtocol(trans), - type_spec_(type_spec), - standalone_(true) - {} - - void setTypeSpec(TypeSpec* type_spec) { - type_spec_ = type_spec; - } - TypeSpec* getTypeSpec() { - return type_spec_; - } - - - /* - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - virtual uint32_t writeMessageEnd(); - - - virtual uint32_t writeStructBegin(const char* name); - - virtual uint32_t writeStructEnd(); - - virtual uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - virtual uint32_t writeFieldEnd(); - - virtual uint32_t writeFieldStop(); - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - virtual uint32_t writeMapEnd(); - - virtual uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeListEnd(); - - virtual uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - virtual uint32_t writeSetEnd(); - - virtual uint32_t writeBool(const bool value); - - virtual uint32_t writeByte(const int8_t byte); - - virtual uint32_t writeI16(const int16_t i16); - - virtual uint32_t writeI32(const int32_t i32); - - virtual uint32_t writeI64(const int64_t i64); - - virtual uint32_t writeDouble(const double dub); - - virtual uint32_t writeString(const std::string& str); - - virtual uint32_t writeBinary(const std::string& str); - - - /* - * Helper writing functions (don't do state transitions). - */ - inline uint32_t subWriteI32(const int32_t i32); - - inline uint32_t subWriteString(const std::string& str); - - uint32_t subWriteBool(const bool value) { - return TBinaryProtocol::writeBool(value); - } - - - /* - * Reading functions - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - /* - * Helper reading functions (don't do state transitions). - */ - inline uint32_t subReadI32(int32_t& i32); - - inline uint32_t subReadString(std::string& str); - - uint32_t subReadBool(bool& value) { - return TBinaryProtocol::readBool(value); - } - - - private: - - // Implementation functions, documented in the .cpp. - inline void checkTType(const TType ttype); - inline void stateTransition(); - - // Read and write variable-length integers. - // Uses the same technique as the MIDI file format. - inline uint32_t vlqRead(uint64_t& vlq); - inline uint32_t vlqWrite(uint64_t vlq); - - // Called before throwing an exception to make the object reusable. - void resetState() { - ts_stack_.clear(); - idx_stack_.clear(); - mkv_stack_.clear(); - } - - // TypeSpec of the top-level structure to write, - // for standalone protocol objects. - TypeSpec* type_spec_; - - std::vector ts_stack_; // TypeSpec stack. - std::vector idx_stack_; // InDeX stack. - std::vector mkv_stack_; // Map Key/Vlue stack. - // True = key, False = value. - - // True iff this is a standalone instance (no RPC). - bool standalone_; -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TDENSEPROTOCOL_H_ diff --git service/include/thrift/protocol/TJSONProtocol.h service/include/thrift/protocol/TJSONProtocol.h deleted file mode 100644 index 2df499a..0000000 --- service/include/thrift/protocol/TJSONProtocol.h +++ /dev/null @@ -1,340 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1 - -#include "TProtocol.h" - -#include - -namespace apache { namespace thrift { namespace protocol { - -// Forward declaration -class TJSONContext; - -/** - * JSON protocol for Thrift. - * - * Implements a protocol which uses JSON as the wire-format. - * - * Thrift types are represented as described below: - * - * 1. Every Thrift integer type is represented as a JSON number. - * - * 2. Thrift doubles are represented as JSON numbers. Some special values are - * represented as strings: - * a. "NaN" for not-a-number values - * b. "Infinity" for postive infinity - * c. "-Infinity" for negative infinity - * - * 3. Thrift string values are emitted as JSON strings, with appropriate - * escaping. - * - * 4. Thrift binary values are encoded into Base64 and emitted as JSON strings. - * The readBinary() method is written such that it will properly skip if - * called on a Thrift string (although it will decode garbage data). - * - * 5. Thrift structs are represented as JSON objects, with the field ID as the - * key, and the field value represented as a JSON object with a single - * key-value pair. The key is a short string identifier for that type, - * followed by the value. The valid type identifiers are: "tf" for bool, - * "i8" for byte, "i16" for 16-bit integer, "i32" for 32-bit integer, "i64" - * for 64-bit integer, "dbl" for double-precision loating point, "str" for - * string (including binary), "rec" for struct ("records"), "map" for map, - * "lst" for list, "set" for set. - * - * 6. Thrift lists and sets are represented as JSON arrays, with the first - * element of the JSON array being the string identifier for the Thrift - * element type and the second element of the JSON array being the count of - * the Thrift elements. The Thrift elements then follow. - * - * 7. Thrift maps are represented as JSON arrays, with the first two elements - * of the JSON array being the string identifiers for the Thrift key type - * and value type, followed by the count of the Thrift pairs, followed by a - * JSON object containing the key-value pairs. Note that JSON keys can only - * be strings, which means that the key type of the Thrift map should be - * restricted to numeric or string types -- in the case of numerics, they - * are serialized as strings. - * - * 8. Thrift messages are represented as JSON arrays, with the protocol - * version #, the message name, the message type, and the sequence ID as - * the first 4 elements. - * - * More discussion of the double handling is probably warranted. The aim of - * the current implementation is to match as closely as possible the behavior - * of Java's Double.toString(), which has no precision loss. Implementors in - * other languages should strive to achieve that where possible. I have not - * yet verified whether boost:lexical_cast, which is doing that work for me in - * C++, loses any precision, but I am leaving this as a future improvement. I - * may try to provide a C component for this, so that other languages could - * bind to the same underlying implementation for maximum consistency. - * - * Note further that JavaScript itself is not capable of representing - * floating point infinities -- presumably when we have a JavaScript Thrift - * client, this would mean that infinities get converted to not-a-number in - * transmission. I don't know of any work-around for this issue. - * - */ -class TJSONProtocol : public TProtocol { - public: - - TJSONProtocol(boost::shared_ptr ptrans); - - ~TJSONProtocol(); - - private: - - void pushContext(boost::shared_ptr c); - - void popContext(); - - uint32_t writeJSONEscapeChar(uint8_t ch); - - uint32_t writeJSONChar(uint8_t ch); - - uint32_t writeJSONString(const std::string &str); - - uint32_t writeJSONBase64(const std::string &str); - - template - uint32_t writeJSONInteger(NumberType num); - - uint32_t writeJSONDouble(double num); - - uint32_t writeJSONObjectStart() ; - - uint32_t writeJSONObjectEnd(); - - uint32_t writeJSONArrayStart(); - - uint32_t writeJSONArrayEnd(); - - uint32_t readJSONSyntaxChar(uint8_t ch); - - uint32_t readJSONEscapeChar(uint8_t *out); - - uint32_t readJSONString(std::string &str, bool skipContext = false); - - uint32_t readJSONBase64(std::string &str); - - uint32_t readJSONNumericChars(std::string &str); - - template - uint32_t readJSONInteger(NumberType &num); - - uint32_t readJSONDouble(double &num); - - uint32_t readJSONObjectStart(); - - uint32_t readJSONObjectEnd(); - - uint32_t readJSONArrayStart(); - - uint32_t readJSONArrayEnd(); - - public: - - /** - * Writing functions. - */ - - uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid); - - uint32_t writeMessageEnd(); - - uint32_t writeStructBegin(const char* name); - - uint32_t writeStructEnd(); - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId); - - uint32_t writeFieldEnd(); - - uint32_t writeFieldStop(); - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size); - - uint32_t writeMapEnd(); - - uint32_t writeListBegin(const TType elemType, - const uint32_t size); - - uint32_t writeListEnd(); - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size); - - uint32_t writeSetEnd(); - - uint32_t writeBool(const bool value); - - uint32_t writeByte(const int8_t byte); - - uint32_t writeI16(const int16_t i16); - - uint32_t writeI32(const int32_t i32); - - uint32_t writeI64(const int64_t i64); - - uint32_t writeDouble(const double dub); - - uint32_t writeString(const std::string& str); - - uint32_t writeBinary(const std::string& str); - - /** - * Reading functions - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid); - - uint32_t readMessageEnd(); - - uint32_t readStructBegin(std::string& name); - - uint32_t readStructEnd(); - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId); - - uint32_t readFieldEnd(); - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size); - - uint32_t readMapEnd(); - - uint32_t readListBegin(TType& elemType, - uint32_t& size); - - uint32_t readListEnd(); - - uint32_t readSetBegin(TType& elemType, - uint32_t& size); - - uint32_t readSetEnd(); - - uint32_t readBool(bool& value); - - uint32_t readByte(int8_t& byte); - - uint32_t readI16(int16_t& i16); - - uint32_t readI32(int32_t& i32); - - uint32_t readI64(int64_t& i64); - - uint32_t readDouble(double& dub); - - uint32_t readString(std::string& str); - - uint32_t readBinary(std::string& str); - - class LookaheadReader { - - public: - - LookaheadReader(TTransport &trans) : - trans_(&trans), - hasData_(false) { - } - - uint8_t read() { - if (hasData_) { - hasData_ = false; - } - else { - trans_->readAll(&data_, 1); - } - return data_; - } - - uint8_t peek() { - if (!hasData_) { - trans_->readAll(&data_, 1); - } - hasData_ = true; - return data_; - } - - private: - TTransport *trans_; - bool hasData_; - uint8_t data_; - }; - - private: - - std::stack > contexts_; - boost::shared_ptr context_; - LookaheadReader reader_; -}; - -/** - * Constructs input and output protocol objects given transports. - */ -class TJSONProtocolFactory : public TProtocolFactory { - public: - TJSONProtocolFactory() {} - - virtual ~TJSONProtocolFactory() {} - - boost::shared_ptr getProtocol(boost::shared_ptr trans) { - return boost::shared_ptr(new TJSONProtocol(trans)); - } -}; - -}}} // apache::thrift::protocol - - -// TODO(dreiss): Move part of ThriftJSONString into a .cpp file and remove this. -#include - -namespace apache { namespace thrift { - -template - std::string ThriftJSONString(const ThriftStruct& ts) { - using namespace apache::thrift::transport; - using namespace apache::thrift::protocol; - TMemoryBuffer* buffer = new TMemoryBuffer; - boost::shared_ptr trans(buffer); - TJSONProtocol protocol(trans); - - ts.write(&protocol); - - uint8_t* buf; - uint32_t size; - buffer->getBuffer(&buf, &size); - return std::string((char*)buf, (unsigned int)size); -} - -}} // apache::thrift - -#endif // #define _THRIFT_PROTOCOL_TJSONPROTOCOL_H_ 1 diff --git service/include/thrift/protocol/TOneWayProtocol.h service/include/thrift/protocol/TOneWayProtocol.h deleted file mode 100644 index 6f08fe1..0000000 --- service/include/thrift/protocol/TOneWayProtocol.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TONEWAYPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TONEWAYPROTOCOL_H_ 1 - -#include "TProtocol.h" - -namespace apache { namespace thrift { namespace protocol { - -/** - * Abstract class for implementing a protocol that can only be written, - * not read. - * - */ -class TWriteOnlyProtocol : public TProtocol { - public: - /** - * @param subclass_name The name of the concrete subclass. - */ - TWriteOnlyProtocol(boost::shared_ptr trans, - const std::string& subclass_name) - : TProtocol(trans) - , subclass_(subclass_name) - {} - - // All writing functions remain abstract. - - /** - * Reading functions all throw an exception. - */ - - uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMessageEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readStructBegin(std::string& name) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readStructEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readFieldEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readMapEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readListBegin(TType& elemType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readListEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readSetBegin(TType& elemType, - uint32_t& size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readSetEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readBool(bool& value) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readByte(int8_t& byte) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI16(int16_t& i16) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI32(int32_t& i32) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readI64(int64_t& i64) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readDouble(double& dub) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readString(std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - uint32_t readBinary(std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support reading (yet)."); - } - - private: - std::string subclass_; -}; - - -/** - * Abstract class for implementing a protocol that can only be read, - * not written. - * - */ -class TReadOnlyProtocol : public TProtocol { - public: - /** - * @param subclass_name The name of the concrete subclass. - */ - TReadOnlyProtocol(boost::shared_ptr trans, - const std::string& subclass_name) - : TProtocol(trans) - , subclass_(subclass_name) - {} - - // All reading functions remain abstract. - - /** - * Writing functions all throw an exception. - */ - - uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMessageEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - - uint32_t writeStructBegin(const char* name) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeStructEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeFieldStop() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeMapEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeListBegin(const TType elemType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeListEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeSetBegin(const TType elemType, - const uint32_t size) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeSetEnd() { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeBool(const bool value) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeByte(const int8_t byte) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI16(const int16_t i16) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI32(const int32_t i32) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeI64(const int64_t i64) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeDouble(const double dub) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeString(const std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - uint32_t writeBinary(const std::string& str) { - throw TProtocolException(TProtocolException::NOT_IMPLEMENTED, - subclass_ + " does not support writing (yet)."); - } - - private: - std::string subclass_; -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TBINARYPROTOCOL_H_ diff --git service/include/thrift/protocol/TProtocol.h service/include/thrift/protocol/TProtocol.h deleted file mode 100644 index 4025827..0000000 --- service/include/thrift/protocol/TProtocol.h +++ /dev/null @@ -1,438 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOL_H_ -#define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1 - -#include -#include - -#include -#include - -#include -#include -#include -#include - - -// Use this to get around strict aliasing rules. -// For example, uint64_t i = bitwise_cast(returns_double()); -// The most obvious implementation is to just cast a pointer, -// but that doesn't work. -// For a pretty in-depth explanation of the problem, see -// http://www.cellperformance.com/mike_acton/2006/06/ (...) -// understanding_strict_aliasing.html -template -static inline To bitwise_cast(From from) { - BOOST_STATIC_ASSERT(sizeof(From) == sizeof(To)); - - // BAD!!! These are all broken with -O2. - //return *reinterpret_cast(&from); // BAD!!! - //return *static_cast(static_cast(&from)); // BAD!!! - //return *(To*)(void*)&from; // BAD!!! - - // Super clean and paritally blessed by section 3.9 of the standard. - //unsigned char c[sizeof(from)]; - //memcpy(c, &from, sizeof(from)); - //To to; - //memcpy(&to, c, sizeof(c)); - //return to; - - // Slightly more questionable. - // Same code emitted by GCC. - //To to; - //memcpy(&to, &from, sizeof(from)); - //return to; - - // Technically undefined, but almost universally supported, - // and the most efficient implementation. - union { - From f; - To t; - } u; - u.f = from; - return u.t; -} - - -namespace apache { namespace thrift { namespace protocol { - -using apache::thrift::transport::TTransport; - -#ifdef HAVE_ENDIAN_H -#include -#endif - -#ifndef __BYTE_ORDER -# if defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) -# define __BYTE_ORDER BYTE_ORDER -# define __LITTLE_ENDIAN LITTLE_ENDIAN -# define __BIG_ENDIAN BIG_ENDIAN -# else -# error "Cannot determine endianness" -# endif -#endif - -#if __BYTE_ORDER == __BIG_ENDIAN -# define ntohll(n) (n) -# define htonll(n) (n) -# if defined(__GNUC__) && defined(__GLIBC__) -# include -# define htolell(n) bswap_64(n) -# define letohll(n) bswap_64(n) -# else /* GNUC & GLIBC */ -# define bswap_64(n) \ - ( (((n) & 0xff00000000000000ull) >> 56) \ - | (((n) & 0x00ff000000000000ull) >> 40) \ - | (((n) & 0x0000ff0000000000ull) >> 24) \ - | (((n) & 0x000000ff00000000ull) >> 8) \ - | (((n) & 0x00000000ff000000ull) << 8) \ - | (((n) & 0x0000000000ff0000ull) << 24) \ - | (((n) & 0x000000000000ff00ull) << 40) \ - | (((n) & 0x00000000000000ffull) << 56) ) -# define ntolell(n) bswap_64(n) -# define letonll(n) bswap_64(n) -# endif /* GNUC & GLIBC */ -#elif __BYTE_ORDER == __LITTLE_ENDIAN -# define htolell(n) (n) -# define letohll(n) (n) -# if defined(__GNUC__) && defined(__GLIBC__) -# include -# define ntohll(n) bswap_64(n) -# define htonll(n) bswap_64(n) -# else /* GNUC & GLIBC */ -# define ntohll(n) ( (((unsigned long long)ntohl(n)) << 32) + ntohl(n >> 32) ) -# define htonll(n) ( (((unsigned long long)htonl(n)) << 32) + htonl(n >> 32) ) -# endif /* GNUC & GLIBC */ -#else /* __BYTE_ORDER */ -# error "Can't define htonll or ntohll!" -#endif - -/** - * Enumerated definition of the types that the Thrift protocol supports. - * Take special note of the T_END type which is used specifically to mark - * the end of a sequence of fields. - */ -enum TType { - T_STOP = 0, - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I08 = 3, - T_I16 = 6, - T_I32 = 8, - T_U64 = 9, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_UTF7 = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - T_UTF8 = 16, - T_UTF16 = 17 -}; - -/** - * Enumerated definition of the message types that the Thrift protocol - * supports. - */ -enum TMessageType { - T_CALL = 1, - T_REPLY = 2, - T_EXCEPTION = 3, - T_ONEWAY = 4 -}; - -/** - * Abstract class for a thrift protocol driver. These are all the methods that - * a protocol must implement. Essentially, there must be some way of reading - * and writing all the base types, plus a mechanism for writing out structs - * with indexed fields. - * - * TProtocol objects should not be shared across multiple encoding contexts, - * as they may need to maintain internal state in some protocols (i.e. XML). - * Note that is is acceptable for the TProtocol module to do its own internal - * buffered reads/writes to the underlying TTransport where appropriate (i.e. - * when parsing an input XML stream, reading should be batched rather than - * looking ahead character by character for a close tag). - * - */ -class TProtocol { - public: - virtual ~TProtocol() {} - - /** - * Writing functions. - */ - - virtual uint32_t writeMessageBegin(const std::string& name, - const TMessageType messageType, - const int32_t seqid) = 0; - - virtual uint32_t writeMessageEnd() = 0; - - - virtual uint32_t writeStructBegin(const char* name) = 0; - - virtual uint32_t writeStructEnd() = 0; - - virtual uint32_t writeFieldBegin(const char* name, - const TType fieldType, - const int16_t fieldId) = 0; - - virtual uint32_t writeFieldEnd() = 0; - - virtual uint32_t writeFieldStop() = 0; - - virtual uint32_t writeMapBegin(const TType keyType, - const TType valType, - const uint32_t size) = 0; - - virtual uint32_t writeMapEnd() = 0; - - virtual uint32_t writeListBegin(const TType elemType, - const uint32_t size) = 0; - - virtual uint32_t writeListEnd() = 0; - - virtual uint32_t writeSetBegin(const TType elemType, - const uint32_t size) = 0; - - virtual uint32_t writeSetEnd() = 0; - - virtual uint32_t writeBool(const bool value) = 0; - - virtual uint32_t writeByte(const int8_t byte) = 0; - - virtual uint32_t writeI16(const int16_t i16) = 0; - - virtual uint32_t writeI32(const int32_t i32) = 0; - - virtual uint32_t writeI64(const int64_t i64) = 0; - - virtual uint32_t writeDouble(const double dub) = 0; - - virtual uint32_t writeString(const std::string& str) = 0; - - virtual uint32_t writeBinary(const std::string& str) = 0; - - /** - * Reading functions - */ - - virtual uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) = 0; - - virtual uint32_t readMessageEnd() = 0; - - virtual uint32_t readStructBegin(std::string& name) = 0; - - virtual uint32_t readStructEnd() = 0; - - virtual uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) = 0; - - virtual uint32_t readFieldEnd() = 0; - - virtual uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) = 0; - - virtual uint32_t readMapEnd() = 0; - - virtual uint32_t readListBegin(TType& elemType, - uint32_t& size) = 0; - - virtual uint32_t readListEnd() = 0; - - virtual uint32_t readSetBegin(TType& elemType, - uint32_t& size) = 0; - - virtual uint32_t readSetEnd() = 0; - - virtual uint32_t readBool(bool& value) = 0; - - virtual uint32_t readByte(int8_t& byte) = 0; - - virtual uint32_t readI16(int16_t& i16) = 0; - - virtual uint32_t readI32(int32_t& i32) = 0; - - virtual uint32_t readI64(int64_t& i64) = 0; - - virtual uint32_t readDouble(double& dub) = 0; - - virtual uint32_t readString(std::string& str) = 0; - - virtual uint32_t readBinary(std::string& str) = 0; - - uint32_t readBool(std::vector::reference ref) { - bool value; - uint32_t rv = readBool(value); - ref = value; - return rv; - } - - /** - * Method to arbitrarily skip over data. - */ - uint32_t skip(TType type) { - switch (type) { - case T_BOOL: - { - bool boolv; - return readBool(boolv); - } - case T_BYTE: - { - int8_t bytev; - return readByte(bytev); - } - case T_I16: - { - int16_t i16; - return readI16(i16); - } - case T_I32: - { - int32_t i32; - return readI32(i32); - } - case T_I64: - { - int64_t i64; - return readI64(i64); - } - case T_DOUBLE: - { - double dub; - return readDouble(dub); - } - case T_STRING: - { - std::string str; - return readBinary(str); - } - case T_STRUCT: - { - uint32_t result = 0; - std::string name; - int16_t fid; - TType ftype; - result += readStructBegin(name); - while (true) { - result += readFieldBegin(name, ftype, fid); - if (ftype == T_STOP) { - break; - } - result += skip(ftype); - result += readFieldEnd(); - } - result += readStructEnd(); - return result; - } - case T_MAP: - { - uint32_t result = 0; - TType keyType; - TType valType; - uint32_t i, size; - result += readMapBegin(keyType, valType, size); - for (i = 0; i < size; i++) { - result += skip(keyType); - result += skip(valType); - } - result += readMapEnd(); - return result; - } - case T_SET: - { - uint32_t result = 0; - TType elemType; - uint32_t i, size; - result += readSetBegin(elemType, size); - for (i = 0; i < size; i++) { - result += skip(elemType); - } - result += readSetEnd(); - return result; - } - case T_LIST: - { - uint32_t result = 0; - TType elemType; - uint32_t i, size; - result += readListBegin(elemType, size); - for (i = 0; i < size; i++) { - result += skip(elemType); - } - result += readListEnd(); - return result; - } - default: - return 0; - } - } - - inline boost::shared_ptr getTransport() { - return ptrans_; - } - - // TODO: remove these two calls, they are for backwards - // compatibility - inline boost::shared_ptr getInputTransport() { - return ptrans_; - } - inline boost::shared_ptr getOutputTransport() { - return ptrans_; - } - - protected: - TProtocol(boost::shared_ptr ptrans): - ptrans_(ptrans) { - trans_ = ptrans.get(); - } - - boost::shared_ptr ptrans_; - TTransport* trans_; - - private: - TProtocol() {} -}; - -/** - * Constructs input and output protocol objects given transports. - */ -class TProtocolFactory { - public: - TProtocolFactory() {} - - virtual ~TProtocolFactory() {} - - virtual boost::shared_ptr getProtocol(boost::shared_ptr trans) = 0; -}; - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TPROTOCOL_H_ 1 diff --git service/include/thrift/protocol/TProtocolException.h service/include/thrift/protocol/TProtocolException.h deleted file mode 100644 index 33011b3..0000000 --- service/include/thrift/protocol/TProtocolException.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ -#define _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ 1 - -#include - -namespace apache { namespace thrift { namespace protocol { - -/** - * Class to encapsulate all the possible types of protocol errors that may - * occur in various protocol systems. This provides a sort of generic - * wrapper around the shitty UNIX E_ error codes that lets a common code - * base of error handling to be used for various types of protocols, i.e. - * pipes etc. - * - */ -class TProtocolException : public apache::thrift::TException { - public: - - /** - * Error codes for the various types of exceptions. - */ - enum TProtocolExceptionType - { UNKNOWN = 0 - , INVALID_DATA = 1 - , NEGATIVE_SIZE = 2 - , SIZE_LIMIT = 3 - , BAD_VERSION = 4 - , NOT_IMPLEMENTED = 5 - }; - - TProtocolException() : - apache::thrift::TException(), - type_(UNKNOWN) {} - - TProtocolException(TProtocolExceptionType type) : - apache::thrift::TException(), - type_(type) {} - - TProtocolException(const std::string& message) : - apache::thrift::TException(message), - type_(UNKNOWN) {} - - TProtocolException(TProtocolExceptionType type, const std::string& message) : - apache::thrift::TException(message), - type_(type) {} - - virtual ~TProtocolException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TProtocolExceptionType getType() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TProtocolException: Unknown protocol exception"; - case INVALID_DATA : return "TProtocolException: Invalid data"; - case NEGATIVE_SIZE : return "TProtocolException: Negative size"; - case SIZE_LIMIT : return "TProtocolException: Exceeded size limit"; - case BAD_VERSION : return "TProtocolException: Invalid version"; - case NOT_IMPLEMENTED : return "TProtocolException: Not implemented"; - default : return "TProtocolException: (Invalid exception type)"; - } - } else { - return message_.c_str(); - } - } - - protected: - /** - * Error code - */ - TProtocolExceptionType type_; - -}; - -}}} // apache::thrift::protocol - -#endif // #ifndef _THRIFT_PROTOCOL_TPROTOCOLEXCEPTION_H_ diff --git service/include/thrift/protocol/TProtocolTap.h service/include/thrift/protocol/TProtocolTap.h deleted file mode 100644 index 5580216..0000000 --- service/include/thrift/protocol/TProtocolTap.h +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ -#define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1 - -#include - -namespace apache { namespace thrift { namespace protocol { - -using apache::thrift::transport::TTransport; - -/** - * Puts a wiretap on a protocol object. Any reads to this class are passed - * through to an enclosed protocol object, but also mirrored as write to a - * second protocol object. - * - */ -class TProtocolTap : public TReadOnlyProtocol { - public: - TProtocolTap(boost::shared_ptr source, - boost::shared_ptr sink) - : TReadOnlyProtocol(source->getTransport(), "TProtocolTap") - , source_(source) - , sink_(sink) - {} - - virtual uint32_t readMessageBegin(std::string& name, - TMessageType& messageType, - int32_t& seqid) { - uint32_t rv = source_->readMessageBegin(name, messageType, seqid); - sink_->writeMessageBegin(name, messageType, seqid); - return rv; - } - - virtual uint32_t readMessageEnd() { - uint32_t rv = source_->readMessageEnd(); - sink_->writeMessageEnd(); - return rv; - } - - virtual uint32_t readStructBegin(std::string& name) { - uint32_t rv = source_->readStructBegin(name); - sink_->writeStructBegin(name.c_str()); - return rv; - } - - virtual uint32_t readStructEnd() { - uint32_t rv = source_->readStructEnd(); - sink_->writeStructEnd(); - return rv; - } - - virtual uint32_t readFieldBegin(std::string& name, - TType& fieldType, - int16_t& fieldId) { - uint32_t rv = source_->readFieldBegin(name, fieldType, fieldId); - if (fieldType == T_STOP) { - sink_->writeFieldStop(); - } else { - sink_->writeFieldBegin(name.c_str(), fieldType, fieldId); - } - return rv; - } - - - virtual uint32_t readFieldEnd() { - uint32_t rv = source_->readFieldEnd(); - sink_->writeFieldEnd(); - return rv; - } - - virtual uint32_t readMapBegin(TType& keyType, - TType& valType, - uint32_t& size) { - uint32_t rv = source_->readMapBegin(keyType, valType, size); - sink_->writeMapBegin(keyType, valType, size); - return rv; - } - - - virtual uint32_t readMapEnd() { - uint32_t rv = source_->readMapEnd(); - sink_->writeMapEnd(); - return rv; - } - - virtual uint32_t readListBegin(TType& elemType, - uint32_t& size) { - uint32_t rv = source_->readListBegin(elemType, size); - sink_->writeListBegin(elemType, size); - return rv; - } - - - virtual uint32_t readListEnd() { - uint32_t rv = source_->readListEnd(); - sink_->writeListEnd(); - return rv; - } - - virtual uint32_t readSetBegin(TType& elemType, - uint32_t& size) { - uint32_t rv = source_->readSetBegin(elemType, size); - sink_->writeSetBegin(elemType, size); - return rv; - } - - - virtual uint32_t readSetEnd() { - uint32_t rv = source_->readSetEnd(); - sink_->writeSetEnd(); - return rv; - } - - virtual uint32_t readBool(bool& value) { - uint32_t rv = source_->readBool(value); - sink_->writeBool(value); - return rv; - } - - virtual uint32_t readByte(int8_t& byte) { - uint32_t rv = source_->readByte(byte); - sink_->writeByte(byte); - return rv; - } - - virtual uint32_t readI16(int16_t& i16) { - uint32_t rv = source_->readI16(i16); - sink_->writeI16(i16); - return rv; - } - - virtual uint32_t readI32(int32_t& i32) { - uint32_t rv = source_->readI32(i32); - sink_->writeI32(i32); - return rv; - } - - virtual uint32_t readI64(int64_t& i64) { - uint32_t rv = source_->readI64(i64); - sink_->writeI64(i64); - return rv; - } - - virtual uint32_t readDouble(double& dub) { - uint32_t rv = source_->readDouble(dub); - sink_->writeDouble(dub); - return rv; - } - - virtual uint32_t readString(std::string& str) { - uint32_t rv = source_->readString(str); - sink_->writeString(str); - return rv; - } - - virtual uint32_t readBinary(std::string& str) { - uint32_t rv = source_->readBinary(str); - sink_->writeBinary(str); - return rv; - } - - private: - boost::shared_ptr source_; - boost::shared_ptr sink_; -}; - -}}} // apache::thrift::protocol - -#endif // #define _THRIFT_PROTOCOL_TPROTOCOLTAP_H_ 1 diff --git service/include/thrift/reflection_limited_types.h service/include/thrift/reflection_limited_types.h deleted file mode 100644 index 677cb4a..0000000 --- service/include/thrift/reflection_limited_types.h +++ /dev/null @@ -1,285 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef reflection_limited_TYPES_H -#define reflection_limited_TYPES_H - -#include -#include -#include -#include - - - -namespace facebook { namespace thrift { namespace reflection { namespace limited { - -enum TTypeTag { - T_VOID = 1, - T_BOOL = 2, - T_BYTE = 3, - T_I16 = 6, - T_I32 = 8, - T_I64 = 10, - T_DOUBLE = 4, - T_STRING = 11, - T_STRUCT = 12, - T_MAP = 13, - T_SET = 14, - T_LIST = 15, - T_ENUM = 101, - T_NOT_REFLECTED = 102 -}; - -class SimpleType { - public: - - static char* ascii_fingerprint; // = "19B5240589E680301A7E32DF3971EFBE"; - static char binary_fingerprint[16]; // = {0x19,0xB5,0x24,0x05,0x89,0xE6,0x80,0x30,0x1A,0x7E,0x32,0xDF,0x39,0x71,0xEF,0xBE}; - - SimpleType() : name("") { - } - - virtual ~SimpleType() throw() {} - - TTypeTag ttype; - std::string name; - - struct __isset { - __isset() : ttype(false), name(false) {} - bool ttype; - bool name; - } __isset; - - bool operator == (const SimpleType & rhs) const - { - if (!(ttype == rhs.ttype)) - return false; - if (!(name == rhs.name)) - return false; - return true; - } - bool operator != (const SimpleType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class ContainerType { - public: - - static char* ascii_fingerprint; // = "654FA6EFFF8242F4C2A604B970686634"; - static char binary_fingerprint[16]; // = {0x65,0x4F,0xA6,0xEF,0xFF,0x82,0x42,0xF4,0xC2,0xA6,0x04,0xB9,0x70,0x68,0x66,0x34}; - - ContainerType() { - } - - virtual ~ContainerType() throw() {} - - TTypeTag ttype; - SimpleType subtype1; - SimpleType subtype2; - - struct __isset { - __isset() : ttype(false), subtype1(false), subtype2(false) {} - bool ttype; - bool subtype1; - bool subtype2; - } __isset; - - bool operator == (const ContainerType & rhs) const - { - if (!(ttype == rhs.ttype)) - return false; - if (!(subtype1 == rhs.subtype1)) - return false; - if (__isset.subtype2 != rhs.__isset.subtype2) - return false; - else if (__isset.subtype2 && !(subtype2 == rhs.subtype2)) - return false; - return true; - } - bool operator != (const ContainerType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftType { - public: - - static char* ascii_fingerprint; // = "76BC1CC759001D7D85FEE75C4F183062"; - static char binary_fingerprint[16]; // = {0x76,0xBC,0x1C,0xC7,0x59,0x00,0x1D,0x7D,0x85,0xFE,0xE7,0x5C,0x4F,0x18,0x30,0x62}; - - ThriftType() : is_container(0) { - } - - virtual ~ThriftType() throw() {} - - bool is_container; - SimpleType simple_type; - ContainerType container_type; - - struct __isset { - __isset() : is_container(false), simple_type(false), container_type(false) {} - bool is_container; - bool simple_type; - bool container_type; - } __isset; - - bool operator == (const ThriftType & rhs) const - { - if (!(is_container == rhs.is_container)) - return false; - if (__isset.simple_type != rhs.__isset.simple_type) - return false; - else if (__isset.simple_type && !(simple_type == rhs.simple_type)) - return false; - if (__isset.container_type != rhs.__isset.container_type) - return false; - else if (__isset.container_type && !(container_type == rhs.container_type)) - return false; - return true; - } - bool operator != (const ThriftType &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Argument { - public: - - static char* ascii_fingerprint; // = "8C45506BE0EFBB22FB19FA40DDCECB3F"; - static char binary_fingerprint[16]; // = {0x8C,0x45,0x50,0x6B,0xE0,0xEF,0xBB,0x22,0xFB,0x19,0xFA,0x40,0xDD,0xCE,0xCB,0x3F}; - - Argument() : key(0), name("") { - } - - virtual ~Argument() throw() {} - - int16_t key; - std::string name; - ThriftType type; - - struct __isset { - __isset() : key(false), name(false), type(false) {} - bool key; - bool name; - bool type; - } __isset; - - bool operator == (const Argument & rhs) const - { - if (!(key == rhs.key)) - return false; - if (!(name == rhs.name)) - return false; - if (!(type == rhs.type)) - return false; - return true; - } - bool operator != (const Argument &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Method { - public: - - static char* ascii_fingerprint; // = "E6573428C492D24C84A19432D39A17B0"; - static char binary_fingerprint[16]; // = {0xE6,0x57,0x34,0x28,0xC4,0x92,0xD2,0x4C,0x84,0xA1,0x94,0x32,0xD3,0x9A,0x17,0xB0}; - - Method() : name("") { - } - - virtual ~Method() throw() {} - - std::string name; - ThriftType return_type; - std::vector arguments; - - struct __isset { - __isset() : name(false), return_type(false), arguments(false) {} - bool name; - bool return_type; - bool arguments; - } __isset; - - bool operator == (const Method & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(return_type == rhs.return_type)) - return false; - if (!(arguments == rhs.arguments)) - return false; - return true; - } - bool operator != (const Method &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -class Service { - public: - - static char* ascii_fingerprint; // = "4673B0777B701D9B02A7A74CEC7908A7"; - static char binary_fingerprint[16]; // = {0x46,0x73,0xB0,0x77,0x7B,0x70,0x1D,0x9B,0x02,0xA7,0xA7,0x4C,0xEC,0x79,0x08,0xA7}; - - Service() : name(""), fully_reflected(0) { - } - - virtual ~Service() throw() {} - - std::string name; - std::vector methods; - bool fully_reflected; - - struct __isset { - __isset() : name(false), methods(false), fully_reflected(false) {} - bool name; - bool methods; - bool fully_reflected; - } __isset; - - bool operator == (const Service & rhs) const - { - if (!(name == rhs.name)) - return false; - if (!(methods == rhs.methods)) - return false; - if (!(fully_reflected == rhs.fully_reflected)) - return false; - return true; - } - bool operator != (const Service &rhs) const { - return !(*this == rhs); - } - - uint32_t read(facebook::thrift::protocol::TProtocol* iprot); - uint32_t write(facebook::thrift::protocol::TProtocol* oprot) const; - -}; - -}}}} // namespace - -#endif diff --git service/include/thrift/server/TNonblockingServer.h service/include/thrift/server/TNonblockingServer.h deleted file mode 100644 index 8506507..0000000 --- service/include/thrift/server/TNonblockingServer.h +++ /dev/null @@ -1,435 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ -#define _THRIFT_SERVER_TNONBLOCKINGSERVER_H_ 1 - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::transport::TMemoryBuffer; -using apache::thrift::protocol::TProtocol; -using apache::thrift::concurrency::Runnable; -using apache::thrift::concurrency::ThreadManager; - -// Forward declaration of class -class TConnection; - -/** - * This is a non-blocking server in C++ for high performance that operates a - * single IO thread. It assumes that all incoming requests are framed with a - * 4 byte length indicator and writes out responses using the same framing. - * - * It does not use the TServerTransport framework, but rather has socket - * operations hardcoded for use with select. - * - */ -class TNonblockingServer : public TServer { - private: - - // Listen backlog - static const int LISTEN_BACKLOG = 1024; - - // Default limit on size of idle connection pool - static const size_t CONNECTION_STACK_LIMIT = 1024; - - // Maximum size of buffer allocated to idle connection - static const uint32_t IDLE_BUFFER_MEM_LIMIT = 8192; - - // Server socket file descriptor - int serverSocket_; - - // Port server runs on - int port_; - - // For processing via thread pool, may be NULL - boost::shared_ptr threadManager_; - - // Is thread pool processing? - bool threadPoolProcessing_; - - // The event base for libevent - event_base* eventBase_; - - // Event struct, for use with eventBase_ - struct event serverEvent_; - - // Number of TConnection object we've created - size_t numTConnections_; - - // Limit for how many TConnection objects to cache - size_t connectionStackLimit_; - - /** - * Max read buffer size for an idle connection. When we place an idle - * TConnection into connectionStack_, we insure that its read buffer is - * reduced to this size to insure that idle connections don't hog memory. - */ - uint32_t idleBufferMemLimit_; - - /** - * This is a stack of all the objects that have been created but that - * are NOT currently in use. When we close a connection, we place it on this - * stack so that the object can be reused later, rather than freeing the - * memory and reallocating a new object later. - */ - std::stack connectionStack_; - - void handleEvent(int fd, short which); - - public: - TNonblockingServer(boost::shared_ptr processor, - int port) : - TServer(processor), - serverSocket_(-1), - port_(port), - threadPoolProcessing_(false), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) {} - - TNonblockingServer(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - int port, - boost::shared_ptr threadManager = boost::shared_ptr()) : - TServer(processor), - serverSocket_(-1), - port_(port), - threadManager_(threadManager), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(protocolFactory); - setOutputProtocolFactory(protocolFactory); - setThreadManager(threadManager); - } - - TNonblockingServer(boost::shared_ptr processor, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - int port, - boost::shared_ptr threadManager = boost::shared_ptr()) : - TServer(processor), - serverSocket_(0), - port_(port), - threadManager_(threadManager), - eventBase_(NULL), - numTConnections_(0), - connectionStackLimit_(CONNECTION_STACK_LIMIT), - idleBufferMemLimit_(IDLE_BUFFER_MEM_LIMIT) { - setInputTransportFactory(inputTransportFactory); - setOutputTransportFactory(outputTransportFactory); - setInputProtocolFactory(inputProtocolFactory); - setOutputProtocolFactory(outputProtocolFactory); - setThreadManager(threadManager); - } - - ~TNonblockingServer() {} - - void setThreadManager(boost::shared_ptr threadManager) { - threadManager_ = threadManager; - threadPoolProcessing_ = (threadManager != NULL); - } - - boost::shared_ptr getThreadManager() { - return threadManager_; - } - - /** - * Get the maximum number of unused TConnection we will hold in reserve. - * - * @return the current limit on TConnection pool size. - */ - size_t getConnectionStackLimit() const { - return connectionStackLimit_; - } - - /** - * Set the maximum number of unused TConnection we will hold in reserve. - * - * @param sz the new limit for TConnection pool size. - */ - void setConnectionStackLimit(size_t sz) { - connectionStackLimit_ = sz; - } - - bool isThreadPoolProcessing() const { - return threadPoolProcessing_; - } - - void addTask(boost::shared_ptr task) { - threadManager_->add(task); - } - - event_base* getEventBase() const { - return eventBase_; - } - - void incrementNumConnections() { - ++numTConnections_; - } - - void decrementNumConnections() { - --numTConnections_; - } - - size_t getNumConnections() { - return numTConnections_; - } - - size_t getNumIdleConnections() { - return connectionStack_.size(); - } - - /** - * Get the maximum limit of memory allocated to idle TConnection objects. - * - * @return # bytes beyond which we will shrink buffers when idle. - */ - size_t getIdleBufferMemLimit() const { - return idleBufferMemLimit_; - } - - /** - * Set the maximum limit of memory allocated to idle TConnection objects. - * If a TConnection object goes idle with more than this much memory - * allocated to its buffer, we shrink it to this value. - * - * @param limit of bytes beyond which we will shrink buffers when idle. - */ - void setIdleBufferMemLimit(size_t limit) { - idleBufferMemLimit_ = limit; - } - - TConnection* createConnection(int socket, short flags); - - void returnConnection(TConnection* connection); - - static void eventHandler(int fd, short which, void* v) { - ((TNonblockingServer*)v)->handleEvent(fd, which); - } - - void listenSocket(); - - void listenSocket(int fd); - - void registerEvents(event_base* base); - - void serve(); -}; - -/** - * Two states for sockets, recv and send mode - */ -enum TSocketState { - SOCKET_RECV, - SOCKET_SEND -}; - -/** - * Four states for the nonblocking servr: - * 1) initialize - * 2) read 4 byte frame size - * 3) read frame of data - * 4) send back data (if any) - */ -enum TAppState { - APP_INIT, - APP_READ_FRAME_SIZE, - APP_READ_REQUEST, - APP_WAIT_TASK, - APP_SEND_RESULT -}; - -/** - * Represents a connection that is handled via libevent. This connection - * essentially encapsulates a socket that has some associated libevent state. - */ -class TConnection { - private: - - class Task; - - // Server handle - TNonblockingServer* server_; - - // Socket handle - int socket_; - - // Libevent object - struct event event_; - - // Libevent flags - short eventFlags_; - - // Socket mode - TSocketState socketState_; - - // Application state - TAppState appState_; - - // How much data needed to read - uint32_t readWant_; - - // Where in the read buffer are we - uint32_t readBufferPos_; - - // Read buffer - uint8_t* readBuffer_; - - // Read buffer size - uint32_t readBufferSize_; - - // Write buffer - uint8_t* writeBuffer_; - - // Write buffer size - uint32_t writeBufferSize_; - - // How far through writing are we? - uint32_t writeBufferPos_; - - // How many times have we read since our last buffer reset? - uint32_t numReadsSinceReset_; - - // How many times have we written since our last buffer reset? - uint32_t numWritesSinceReset_; - - // Task handle - int taskHandle_; - - // Task event - struct event taskEvent_; - - // Transport to read from - boost::shared_ptr inputTransport_; - - // Transport that processor writes to - boost::shared_ptr outputTransport_; - - // extra transport generated by transport factory (e.g. BufferedRouterTransport) - boost::shared_ptr factoryInputTransport_; - boost::shared_ptr factoryOutputTransport_; - - // Protocol decoder - boost::shared_ptr inputProtocol_; - - // Protocol encoder - boost::shared_ptr outputProtocol_; - - // Go into read mode - void setRead() { - setFlags(EV_READ | EV_PERSIST); - } - - // Go into write mode - void setWrite() { - setFlags(EV_WRITE | EV_PERSIST); - } - - // Set socket idle - void setIdle() { - setFlags(0); - } - - // Set event flags - void setFlags(short eventFlags); - - // Libevent handlers - void workSocket(); - - // Close this client and reset - void close(); - - public: - - // Constructor - TConnection(int socket, short eventFlags, TNonblockingServer *s) { - readBuffer_ = (uint8_t*)std::malloc(1024); - if (readBuffer_ == NULL) { - throw new apache::thrift::TException("Out of memory."); - } - readBufferSize_ = 1024; - - numReadsSinceReset_ = 0; - numWritesSinceReset_ = 0; - - // Allocate input and output tranpsorts - // these only need to be allocated once per TConnection (they don't need to be - // reallocated on init() call) - inputTransport_ = boost::shared_ptr(new TMemoryBuffer(readBuffer_, readBufferSize_)); - outputTransport_ = boost::shared_ptr(new TMemoryBuffer()); - - init(socket, eventFlags, s); - server_->incrementNumConnections(); - } - - ~TConnection() { - server_->decrementNumConnections(); - } - - /** - * Check read buffer against a given limit and shrink it if exceeded. - * - * @param limit we limit buffer size to. - */ - void checkIdleBufferMemLimit(uint32_t limit); - - // Initialize - void init(int socket, short eventFlags, TNonblockingServer *s); - - // Transition into a new state - void transition(); - - // Handler wrapper - static void eventHandler(int fd, short /* which */, void* v) { - assert(fd == ((TConnection*)v)->socket_); - ((TConnection*)v)->workSocket(); - } - - // Handler wrapper for task block - static void taskHandler(int fd, short /* which */, void* v) { - assert(fd == ((TConnection*)v)->taskHandle_); - if (-1 == ::close(((TConnection*)v)->taskHandle_)) { - GlobalOutput.perror("TConnection::taskHandler close handle failed, resource leak ", errno); - } - ((TConnection*)v)->transition(); - } - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ diff --git service/include/thrift/server/TServer.h service/include/thrift/server/TServer.h deleted file mode 100644 index 5c4c588..0000000 --- service/include/thrift/server/TServer.h +++ /dev/null @@ -1,213 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_SERVER_TSERVER_H_ -#define _THRIFT_SERVER_TSERVER_H_ 1 - -#include -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::TProcessor; -using apache::thrift::protocol::TBinaryProtocolFactory; -using apache::thrift::protocol::TProtocol; -using apache::thrift::protocol::TProtocolFactory; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransport; -using apache::thrift::transport::TTransportFactory; - -/** - * Virtual interface class that can handle events from the server core. To - * use this you should subclass it and implement the methods that you care - * about. Your subclass can also store local data that you may care about, - * such as additional "arguments" to these methods (stored in the object - * instance's state). - */ -class TServerEventHandler { - public: - - virtual ~TServerEventHandler() {} - - /** - * Called before the server begins. - */ - virtual void preServe() {} - - /** - * Called when a new client has connected and is about to being processing. - */ - virtual void clientBegin(boost::shared_ptr /* input */, - boost::shared_ptr /* output */) {} - - /** - * Called when a client has finished making requests. - */ - virtual void clientEnd(boost::shared_ptr /* input */, - boost::shared_ptr /* output */) {} - - protected: - - /** - * Prevent direct instantiation. - */ - TServerEventHandler() {} - -}; - -/** - * Thrift server. - * - */ -class TServer : public concurrency::Runnable { - public: - - virtual ~TServer() {} - - virtual void serve() = 0; - - virtual void stop() {} - - // Allows running the server as a Runnable thread - virtual void run() { - serve(); - } - - boost::shared_ptr getProcessor() { - return processor_; - } - - boost::shared_ptr getServerTransport() { - return serverTransport_; - } - - boost::shared_ptr getInputTransportFactory() { - return inputTransportFactory_; - } - - boost::shared_ptr getOutputTransportFactory() { - return outputTransportFactory_; - } - - boost::shared_ptr getInputProtocolFactory() { - return inputProtocolFactory_; - } - - boost::shared_ptr getOutputProtocolFactory() { - return outputProtocolFactory_; - } - - boost::shared_ptr getEventHandler() { - return eventHandler_; - } - -protected: - TServer(boost::shared_ptr processor): - processor_(processor) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - setOutputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - } - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport): - processor_(processor), - serverTransport_(serverTransport) { - setInputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setOutputTransportFactory(boost::shared_ptr(new TTransportFactory())); - setInputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - setOutputProtocolFactory(boost::shared_ptr(new TBinaryProtocolFactory())); - } - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory): - processor_(processor), - serverTransport_(serverTransport), - inputTransportFactory_(transportFactory), - outputTransportFactory_(transportFactory), - inputProtocolFactory_(protocolFactory), - outputProtocolFactory_(protocolFactory) {} - - TServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory): - processor_(processor), - serverTransport_(serverTransport), - inputTransportFactory_(inputTransportFactory), - outputTransportFactory_(outputTransportFactory), - inputProtocolFactory_(inputProtocolFactory), - outputProtocolFactory_(outputProtocolFactory) {} - - - // Class variables - boost::shared_ptr processor_; - boost::shared_ptr serverTransport_; - - boost::shared_ptr inputTransportFactory_; - boost::shared_ptr outputTransportFactory_; - - boost::shared_ptr inputProtocolFactory_; - boost::shared_ptr outputProtocolFactory_; - - boost::shared_ptr eventHandler_; - -public: - void setInputTransportFactory(boost::shared_ptr inputTransportFactory) { - inputTransportFactory_ = inputTransportFactory; - } - - void setOutputTransportFactory(boost::shared_ptr outputTransportFactory) { - outputTransportFactory_ = outputTransportFactory; - } - - void setInputProtocolFactory(boost::shared_ptr inputProtocolFactory) { - inputProtocolFactory_ = inputProtocolFactory; - } - - void setOutputProtocolFactory(boost::shared_ptr outputProtocolFactory) { - outputProtocolFactory_ = outputProtocolFactory; - } - - void setServerEventHandler(boost::shared_ptr eventHandler) { - eventHandler_ = eventHandler; - } - -}; - -/** - * Helper function to increase the max file descriptors limit - * for the current process and all of its children. - * By default, tries to increase it to as much as 2^24. - */ - int increase_max_fds(int max_fds=(1<<24)); - - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSERVER_H_ diff --git service/include/thrift/server/TSimpleServer.h service/include/thrift/server/TSimpleServer.h deleted file mode 100644 index c4fc91c..0000000 --- service/include/thrift/server/TSimpleServer.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ -#define _THRIFT_SERVER_TSIMPLESERVER_H_ 1 - -#include "server/TServer.h" -#include "transport/TServerTransport.h" - -namespace apache { namespace thrift { namespace server { - -/** - * This is the most basic simple server. It is single-threaded and runs a - * continuous loop of accepting a single connection, processing requests on - * that connection until it closes, and then repeating. It is a good example - * of how to extend the TServer interface. - * - */ -class TSimpleServer : public TServer { - public: - TSimpleServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory) : - TServer(processor, serverTransport, transportFactory, protocolFactory), - stop_(false) {} - - TSimpleServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory): - TServer(processor, serverTransport, - inputTransportFactory, outputTransportFactory, - inputProtocolFactory, outputProtocolFactory), - stop_(false) {} - - ~TSimpleServer() {} - - void serve(); - - void stop() { - stop_ = true; - } - - protected: - bool stop_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TSIMPLESERVER_H_ diff --git service/include/thrift/server/TThreadPoolServer.h service/include/thrift/server/TThreadPoolServer.h deleted file mode 100644 index 7b7e906..0000000 --- service/include/thrift/server/TThreadPoolServer.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ -#define _THRIFT_SERVER_TTHREADPOOLSERVER_H_ 1 - -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::concurrency::ThreadManager; -using apache::thrift::protocol::TProtocolFactory; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransportFactory; - -class TThreadPoolServer : public TServer { - public: - class Task; - - TThreadPoolServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory, - boost::shared_ptr threadManager); - - TThreadPoolServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr inputTransportFactory, - boost::shared_ptr outputTransportFactory, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - boost::shared_ptr threadManager); - - virtual ~TThreadPoolServer(); - - virtual void serve(); - - virtual int64_t getTimeout() const; - - virtual void setTimeout(int64_t value); - - virtual void stop() { - stop_ = true; - serverTransport_->interrupt(); - } - - protected: - - boost::shared_ptr threadManager_; - - volatile bool stop_; - - volatile int64_t timeout_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TTHREADPOOLSERVER_H_ diff --git service/include/thrift/server/TThreadedServer.h service/include/thrift/server/TThreadedServer.h deleted file mode 100644 index 4d0811a..0000000 --- service/include/thrift/server/TThreadedServer.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_ -#define _THRIFT_SERVER_TTHREADEDSERVER_H_ 1 - -#include -#include -#include -#include - -#include - -namespace apache { namespace thrift { namespace server { - -using apache::thrift::TProcessor; -using apache::thrift::transport::TServerTransport; -using apache::thrift::transport::TTransportFactory; -using apache::thrift::concurrency::Monitor; -using apache::thrift::concurrency::ThreadFactory; - -class TThreadedServer : public TServer { - - public: - class Task; - - TThreadedServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory); - - TThreadedServer(boost::shared_ptr processor, - boost::shared_ptr serverTransport, - boost::shared_ptr transportFactory, - boost::shared_ptr protocolFactory, - boost::shared_ptr threadFactory); - - virtual ~TThreadedServer(); - - virtual void serve(); - - void stop() { - stop_ = true; - serverTransport_->interrupt(); - } - - protected: - boost::shared_ptr threadFactory_; - volatile bool stop_; - - Monitor tasksMonitor_; - std::set tasks_; - -}; - -}}} // apache::thrift::server - -#endif // #ifndef _THRIFT_SERVER_TTHREADEDSERVER_H_ diff --git service/include/thrift/transport/TBufferTransports.h service/include/thrift/transport/TBufferTransports.h deleted file mode 100644 index 1908205..0000000 --- service/include/thrift/transport/TBufferTransports.h +++ /dev/null @@ -1,667 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ -#define _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ 1 - -#include -#include "boost/scoped_array.hpp" - -#include - -#ifdef __GNUC__ -#define TDB_LIKELY(val) (__builtin_expect((val), 1)) -#define TDB_UNLIKELY(val) (__builtin_expect((val), 0)) -#else -#define TDB_LIKELY(val) (val) -#define TDB_UNLIKELY(val) (val) -#endif - -namespace apache { namespace thrift { namespace transport { - - -/** - * Base class for all transports that use read/write buffers for performance. - * - * TBufferBase is designed to implement the fast-path "memcpy" style - * operations that work in the common case. It does so with small and - * (eventually) nonvirtual, inlinable methods. TBufferBase is an abstract - * class. Subclasses are expected to define the "slow path" operations - * that have to be done when the buffers are full or empty. - * - */ -class TBufferBase : public TTransport { - - public: - - /** - * Fast-path read. - * - * When we have enough data buffered to fulfill the read, we can satisfy it - * with a single memcpy, then adjust our internal pointers. If the buffer - * is empty, we call out to our slow path, implemented by a subclass. - * This method is meant to eventually be nonvirtual and inlinable. - */ - uint32_t read(uint8_t* buf, uint32_t len) { - uint8_t* new_rBase = rBase_ + len; - if (TDB_LIKELY(new_rBase <= rBound_)) { - std::memcpy(buf, rBase_, len); - rBase_ = new_rBase; - return len; - } - return readSlow(buf, len); - } - - /** - * Fast-path write. - * - * When we have enough empty space in our buffer to accomodate the write, we - * can satisfy it with a single memcpy, then adjust our internal pointers. - * If the buffer is full, we call out to our slow path, implemented by a - * subclass. This method is meant to eventually be nonvirtual and - * inlinable. - */ - void write(const uint8_t* buf, uint32_t len) { - uint8_t* new_wBase = wBase_ + len; - if (TDB_LIKELY(new_wBase <= wBound_)) { - std::memcpy(wBase_, buf, len); - wBase_ = new_wBase; - return; - } - writeSlow(buf, len); - } - - /** - * Fast-path borrow. A lot like the fast-path read. - */ - const uint8_t* borrow(uint8_t* buf, uint32_t* len) { - if (TDB_LIKELY(static_cast(*len) <= rBound_ - rBase_)) { - // With strict aliasing, writing to len shouldn't force us to - // refetch rBase_ from memory. TODO(dreiss): Verify this. - *len = rBound_ - rBase_; - return rBase_; - } - return borrowSlow(buf, len); - } - - /** - * Consume doesn't require a slow path. - */ - void consume(uint32_t len) { - if (TDB_LIKELY(static_cast(len) <= rBound_ - rBase_)) { - rBase_ += len; - } else { - throw TTransportException(TTransportException::BAD_ARGS, - "consume did not follow a borrow."); - } - } - - - protected: - - /// Slow path read. - virtual uint32_t readSlow(uint8_t* buf, uint32_t len) = 0; - - /// Slow path write. - virtual void writeSlow(const uint8_t* buf, uint32_t len) = 0; - - /** - * Slow path borrow. - * - * POSTCONDITION: return == NULL || rBound_ - rBase_ >= *len - */ - virtual const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len) = 0; - - /** - * Trivial constructor. - * - * Initialize pointers safely. Constructing is not a very - * performance-sensitive operation, so it is okay to just leave it to - * the concrete class to set up pointers correctly. - */ - TBufferBase() - : rBase_(NULL) - , rBound_(NULL) - , wBase_(NULL) - , wBound_(NULL) - {} - - /// Convenience mutator for setting the read buffer. - void setReadBuffer(uint8_t* buf, uint32_t len) { - rBase_ = buf; - rBound_ = buf+len; - } - - /// Convenience mutator for setting the write buffer. - void setWriteBuffer(uint8_t* buf, uint32_t len) { - wBase_ = buf; - wBound_ = buf+len; - } - - virtual ~TBufferBase() {} - - /// Reads begin here. - uint8_t* rBase_; - /// Reads may extend to just before here. - uint8_t* rBound_; - - /// Writes begin here. - uint8_t* wBase_; - /// Writes may extend to just before here. - uint8_t* wBound_; -}; - - -/** - * Base class for all transport which wraps transport to new one. - */ -class TUnderlyingTransport : public TBufferBase { - public: - static const int DEFAULT_BUFFER_SIZE = 512; - - virtual bool peek() { - return (rBase_ < rBound_) || transport_->peek(); - } - - void open() { - transport_->open(); - } - - bool isOpen() { - return transport_->isOpen(); - } - - void close() { - flush(); - transport_->close(); - } - - boost::shared_ptr getUnderlyingTransport() { - return transport_; - } - - protected: - boost::shared_ptr transport_; - - uint32_t rBufSize_; - uint32_t wBufSize_; - boost::scoped_array rBuf_; - boost::scoped_array wBuf_; - - TUnderlyingTransport(boost::shared_ptr transport, uint32_t sz) - : transport_(transport) - , rBufSize_(sz) - , wBufSize_(sz) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} - - TUnderlyingTransport(boost::shared_ptr transport) - : transport_(transport) - , rBufSize_(DEFAULT_BUFFER_SIZE) - , wBufSize_(DEFAULT_BUFFER_SIZE) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} - - TUnderlyingTransport(boost::shared_ptr transport, uint32_t rsz, uint32_t wsz) - : transport_(transport) - , rBufSize_(rsz) - , wBufSize_(wsz) - , rBuf_(new uint8_t[rBufSize_]) - , wBuf_(new uint8_t[wBufSize_]) {} -}; - -/** - * Buffered transport. For reads it will read more data than is requested - * and will serve future data out of a local buffer. For writes, data is - * stored to an in memory buffer before being written out. - * - */ -class TBufferedTransport : public TUnderlyingTransport { - public: - - /// Use default buffer sizes. - TBufferedTransport(boost::shared_ptr transport) - : TUnderlyingTransport(transport) - { - initPointers(); - } - - /// Use specified buffer sizes. - TBufferedTransport(boost::shared_ptr transport, uint32_t sz) - : TUnderlyingTransport(transport, sz) - { - initPointers(); - } - - /// Use specified read and write buffer sizes. - TBufferedTransport(boost::shared_ptr transport, uint32_t rsz, uint32_t wsz) - : TUnderlyingTransport(transport, rsz, wsz) - { - initPointers(); - } - - virtual bool peek() { - /* shigin: see THRIFT-96 discussion */ - if (rBase_ == rBound_) { - setReadBuffer(rBuf_.get(), transport_->read(rBuf_.get(), rBufSize_)); - } - return (rBound_ > rBase_); - } - virtual uint32_t readSlow(uint8_t* buf, uint32_t len); - - virtual void writeSlow(const uint8_t* buf, uint32_t len); - - void flush(); - - - /** - * The following behavior is currently implemented by TBufferedTransport, - * but that may change in a future version: - * 1/ If len is at most rBufSize_, borrow will never return NULL. - * Depending on the underlying transport, it could throw an exception - * or hang forever. - * 2/ Some borrow requests may copy bytes internally. However, - * if len is at most rBufSize_/2, none of the copied bytes - * will ever have to be copied again. For optimial performance, - * stay under this limit. - */ - virtual const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - protected: - void initPointers() { - setReadBuffer(rBuf_.get(), 0); - setWriteBuffer(wBuf_.get(), wBufSize_); - // Write size never changes. - } -}; - - -/** - * Wraps a transport into a buffered one. - * - */ -class TBufferedTransportFactory : public TTransportFactory { - public: - TBufferedTransportFactory() {} - - virtual ~TBufferedTransportFactory() {} - - /** - * Wraps the transport into a buffered one. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return boost::shared_ptr(new TBufferedTransport(trans)); - } - -}; - - -/** - * Framed transport. All writes go into an in-memory buffer until flush is - * called, at which point the transport writes the length of the entire - * binary chunk followed by the data payload. This allows the receiver on the - * other end to always do fixed-length reads. - * - */ -class TFramedTransport : public TUnderlyingTransport { - public: - - /// Use default buffer sizes. - TFramedTransport(boost::shared_ptr transport) - : TUnderlyingTransport(transport) - { - initPointers(); - } - - TFramedTransport(boost::shared_ptr transport, uint32_t sz) - : TUnderlyingTransport(transport, sz) - { - initPointers(); - } - - virtual uint32_t readSlow(uint8_t* buf, uint32_t len); - - virtual void writeSlow(const uint8_t* buf, uint32_t len); - - virtual void flush(); - - const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - protected: - /** - * Reads a frame of input from the underlying stream. - */ - void readFrame(); - - void initPointers() { - setReadBuffer(NULL, 0); - setWriteBuffer(wBuf_.get(), wBufSize_); - - // Pad the buffer so we can insert the size later. - int32_t pad = 0; - this->write((uint8_t*)&pad, sizeof(pad)); - } -}; - -/** - * Wraps a transport into a framed one. - * - */ -class TFramedTransportFactory : public TTransportFactory { - public: - TFramedTransportFactory() {} - - virtual ~TFramedTransportFactory() {} - - /** - * Wraps the transport into a framed one. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return boost::shared_ptr(new TFramedTransport(trans)); - } - -}; - - -/** - * A memory buffer is a tranpsort that simply reads from and writes to an - * in memory buffer. Anytime you call write on it, the data is simply placed - * into a buffer, and anytime you call read, data is read from that buffer. - * - * The buffers are allocated using C constructs malloc,realloc, and the size - * doubles as necessary. We've considered using scoped - * - */ -class TMemoryBuffer : public TBufferBase { - private: - - // Common initialization done by all constructors. - void initCommon(uint8_t* buf, uint32_t size, bool owner, uint32_t wPos) { - if (buf == NULL && size != 0) { - assert(owner); - buf = (uint8_t*)std::malloc(size); - if (buf == NULL) { - throw TTransportException("Out of memory"); - } - } - - buffer_ = buf; - bufferSize_ = size; - - rBase_ = buffer_; - rBound_ = buffer_ + wPos; - // TODO(dreiss): Investigate NULL-ing this if !owner. - wBase_ = buffer_ + wPos; - wBound_ = buffer_ + bufferSize_; - - owner_ = owner; - - // rBound_ is really an artifact. In principle, it should always be - // equal to wBase_. We update it in a few places (computeRead, etc.). - } - - public: - static const uint32_t defaultSize = 1024; - - /** - * This enum specifies how a TMemoryBuffer should treat - * memory passed to it via constructors or resetBuffer. - * - * OBSERVE: - * TMemoryBuffer will simply store a pointer to the memory. - * It is the callers responsibility to ensure that the pointer - * remains valid for the lifetime of the TMemoryBuffer, - * and that it is properly cleaned up. - * Note that no data can be written to observed buffers. - * - * COPY: - * TMemoryBuffer will make an internal copy of the buffer. - * The caller has no responsibilities. - * - * TAKE_OWNERSHIP: - * TMemoryBuffer will become the "owner" of the buffer, - * and will be responsible for freeing it. - * The membory must have been allocated with malloc. - */ - enum MemoryPolicy - { OBSERVE = 1 - , COPY = 2 - , TAKE_OWNERSHIP = 3 - }; - - /** - * Construct a TMemoryBuffer with a default-sized buffer, - * owned by the TMemoryBuffer object. - */ - TMemoryBuffer() { - initCommon(NULL, defaultSize, true, 0); - } - - /** - * Construct a TMemoryBuffer with a buffer of a specified size, - * owned by the TMemoryBuffer object. - * - * @param sz The initial size of the buffer. - */ - TMemoryBuffer(uint32_t sz) { - initCommon(NULL, sz, true, 0); - } - - /** - * Construct a TMemoryBuffer with buf as its initial contents. - * - * @param buf The initial contents of the buffer. - * Note that, while buf is a non-const pointer, - * TMemoryBuffer will not write to it if policy == OBSERVE, - * so it is safe to const_cast(whatever). - * @param sz The size of @c buf. - * @param policy See @link MemoryPolicy @endlink . - */ - TMemoryBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE) { - if (buf == NULL && sz != 0) { - throw TTransportException(TTransportException::BAD_ARGS, - "TMemoryBuffer given null buffer with non-zero size."); - } - - switch (policy) { - case OBSERVE: - case TAKE_OWNERSHIP: - initCommon(buf, sz, policy == TAKE_OWNERSHIP, sz); - break; - case COPY: - initCommon(NULL, sz, true, 0); - this->write(buf, sz); - break; - default: - throw TTransportException(TTransportException::BAD_ARGS, - "Invalid MemoryPolicy for TMemoryBuffer"); - } - } - - ~TMemoryBuffer() { - if (owner_) { - std::free(buffer_); - } - } - - bool isOpen() { - return true; - } - - bool peek() { - return (rBase_ < wBase_); - } - - void open() {} - - void close() {} - - // TODO(dreiss): Make bufPtr const. - void getBuffer(uint8_t** bufPtr, uint32_t* sz) { - *bufPtr = rBase_; - *sz = wBase_ - rBase_; - } - - std::string getBufferAsString() { - if (buffer_ == NULL) { - return ""; - } - uint8_t* buf; - uint32_t sz; - getBuffer(&buf, &sz); - return std::string((char*)buf, (std::string::size_type)sz); - } - - void appendBufferToString(std::string& str) { - if (buffer_ == NULL) { - return; - } - uint8_t* buf; - uint32_t sz; - getBuffer(&buf, &sz); - str.append((char*)buf, sz); - } - - void resetBuffer(bool reset_capacity = false) { - if (reset_capacity) - { - assert(owner_); - - void* new_buffer = std::realloc(buffer_, defaultSize); - - if (new_buffer == NULL) { - throw TTransportException("Out of memory."); - } - - buffer_ = (uint8_t*) new_buffer; - bufferSize_ = defaultSize; - - wBound_ = buffer_ + bufferSize_; - } - - rBase_ = buffer_; - rBound_ = buffer_; - wBase_ = buffer_; - // It isn't safe to write into a buffer we don't own. - if (!owner_) { - wBound_ = wBase_; - bufferSize_ = 0; - } - } - - /// See constructor documentation. - void resetBuffer(uint8_t* buf, uint32_t sz, MemoryPolicy policy = OBSERVE) { - // Use a variant of the copy-and-swap trick for assignment operators. - // This is sub-optimal in terms of performance for two reasons: - // 1/ The constructing and swapping of the (small) values - // in the temporary object takes some time, and is not necessary. - // 2/ If policy == COPY, we allocate the new buffer before - // freeing the old one, precluding the possibility of - // reusing that memory. - // I doubt that either of these problems could be optimized away, - // but the second is probably no a common case, and the first is minor. - // I don't expect resetBuffer to be a common operation, so I'm willing to - // bite the performance bullet to make the method this simple. - - // Construct the new buffer. - TMemoryBuffer new_buffer(buf, sz, policy); - // Move it into ourself. - this->swap(new_buffer); - // Our old self gets destroyed. - } - - std::string readAsString(uint32_t len) { - std::string str; - (void)readAppendToString(str, len); - return str; - } - - uint32_t readAppendToString(std::string& str, uint32_t len); - - void readEnd() { - if (rBase_ == wBase_) { - resetBuffer(); - } - } - - uint32_t available_read() const { - // Remember, wBase_ is the real rBound_. - return wBase_ - rBase_; - } - - uint32_t available_write() const { - return wBound_ - wBase_; - } - - // Returns a pointer to where the client can write data to append to - // the TMemoryBuffer, and ensures the buffer is big enough to accomodate a - // write of the provided length. The returned pointer is very convenient for - // passing to read(), recv(), or similar. You must call wroteBytes() as soon - // as data is written or the buffer will not be aware that data has changed. - uint8_t* getWritePtr(uint32_t len) { - ensureCanWrite(len); - return wBase_; - } - - // Informs the buffer that the client has written 'len' bytes into storage - // that had been provided by getWritePtr(). - void wroteBytes(uint32_t len); - - protected: - void swap(TMemoryBuffer& that) { - using std::swap; - swap(buffer_, that.buffer_); - swap(bufferSize_, that.bufferSize_); - - swap(rBase_, that.rBase_); - swap(rBound_, that.rBound_); - swap(wBase_, that.wBase_); - swap(wBound_, that.wBound_); - - swap(owner_, that.owner_); - } - - // Make sure there's at least 'len' bytes available for writing. - void ensureCanWrite(uint32_t len); - - // Compute the position and available data for reading. - void computeRead(uint32_t len, uint8_t** out_start, uint32_t* out_give); - - uint32_t readSlow(uint8_t* buf, uint32_t len); - - void writeSlow(const uint8_t* buf, uint32_t len); - - const uint8_t* borrowSlow(uint8_t* buf, uint32_t* len); - - // Data buffer - uint8_t* buffer_; - - // Allocated buffer size - uint32_t bufferSize_; - - // Is this object the owner of the buffer? - bool owner_; - - // Don't forget to update constrctors, initCommon, and swap if - // you add new members. -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TBUFFERTRANSPORTS_H_ diff --git service/include/thrift/transport/TFDTransport.h service/include/thrift/transport/TFDTransport.h deleted file mode 100644 index bda5d82..0000000 --- service/include/thrift/transport/TFDTransport.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TFDTRANSPORT_H_ 1 - -#include -#include - -#include "TTransport.h" -#include "TServerSocket.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * Dead-simple wrapper around a file descriptor. - * - */ -class TFDTransport : public TTransport { - public: - enum ClosePolicy - { NO_CLOSE_ON_DESTROY = 0 - , CLOSE_ON_DESTROY = 1 - }; - - TFDTransport(int fd, ClosePolicy close_policy = NO_CLOSE_ON_DESTROY) - : fd_(fd) - , close_policy_(close_policy) - {} - - ~TFDTransport() { - if (close_policy_ == CLOSE_ON_DESTROY) { - close(); - } - } - - bool isOpen() { return fd_ >= 0; } - - void open() {} - - void close(); - - uint32_t read(uint8_t* buf, uint32_t len); - - void write(const uint8_t* buf, uint32_t len); - - void setFD(int fd) { fd_ = fd; } - int getFD() { return fd_; } - - protected: - int fd_; - ClosePolicy close_policy_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TFDTRANSPORT_H_ diff --git service/include/thrift/transport/TFileTransport.h service/include/thrift/transport/TFileTransport.h deleted file mode 100644 index b08c5c8..0000000 --- service/include/thrift/transport/TFileTransport.h +++ /dev/null @@ -1,442 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TFILETRANSPORT_H_ -#define _THRIFT_TRANSPORT_TFILETRANSPORT_H_ 1 - -#include "TTransport.h" -#include "Thrift.h" -#include "TProcessor.h" - -#include -#include - -#include - -#include - -namespace apache { namespace thrift { namespace transport { - -using apache::thrift::TProcessor; -using apache::thrift::protocol::TProtocolFactory; - -// Data pertaining to a single event -typedef struct eventInfo { - uint8_t* eventBuff_; - uint32_t eventSize_; - uint32_t eventBuffPos_; - - eventInfo():eventBuff_(NULL), eventSize_(0), eventBuffPos_(0){}; - ~eventInfo() { - if (eventBuff_) { - delete[] eventBuff_; - } - } -} eventInfo; - -// information about current read state -typedef struct readState { - eventInfo* event_; - - // keep track of event size - uint8_t eventSizeBuff_[4]; - uint8_t eventSizeBuffPos_; - bool readingSize_; - - // read buffer variables - int32_t bufferPtr_; - int32_t bufferLen_; - - // last successful dispatch point - int32_t lastDispatchPtr_; - - void resetState(uint32_t lastDispatchPtr) { - readingSize_ = true; - eventSizeBuffPos_ = 0; - lastDispatchPtr_ = lastDispatchPtr; - } - - void resetAllValues() { - resetState(0); - bufferPtr_ = 0; - bufferLen_ = 0; - if (event_) { - delete(event_); - } - event_ = 0; - } - - readState() { - event_ = 0; - resetAllValues(); - } - - ~readState() { - if (event_) { - delete(event_); - } - } - -} readState; - -/** - * TFileTransportBuffer - buffer class used by TFileTransport for queueing up events - * to be written to disk. Should be used in the following way: - * 1) Buffer created - * 2) Buffer written to (addEvent) - * 3) Buffer read from (getNext) - * 4) Buffer reset (reset) - * 5) Go back to 2, or destroy buffer - * - * The buffer should never be written to after it is read from, unless it is reset first. - * Note: The above rules are enforced mainly for debugging its sole client TFileTransport - * which uses the buffer in this way. - * - */ -class TFileTransportBuffer { - public: - TFileTransportBuffer(uint32_t size); - ~TFileTransportBuffer(); - - bool addEvent(eventInfo *event); - eventInfo* getNext(); - void reset(); - bool isFull(); - bool isEmpty(); - - private: - TFileTransportBuffer(); // should not be used - - enum mode { - WRITE, - READ - }; - mode bufferMode_; - - uint32_t writePoint_; - uint32_t readPoint_; - uint32_t size_; - eventInfo** buffer_; -}; - -/** - * Abstract interface for transports used to read files - */ -class TFileReaderTransport : virtual public TTransport { - public: - virtual int32_t getReadTimeout() = 0; - virtual void setReadTimeout(int32_t readTimeout) = 0; - - virtual uint32_t getNumChunks() = 0; - virtual uint32_t getCurChunk() = 0; - virtual void seekToChunk(int32_t chunk) = 0; - virtual void seekToEnd() = 0; -}; - -/** - * Abstract interface for transports used to write files - */ -class TFileWriterTransport : virtual public TTransport { - public: - virtual uint32_t getChunkSize() = 0; - virtual void setChunkSize(uint32_t chunkSize) = 0; -}; - -/** - * File implementation of a transport. Reads and writes are done to a - * file on disk. - * - */ -class TFileTransport : public TFileReaderTransport, - public TFileWriterTransport { - public: - TFileTransport(std::string path, bool readOnly=false); - ~TFileTransport(); - - // TODO: what is the correct behaviour for this? - // the log file is generally always open - bool isOpen() { - return true; - } - - void write(const uint8_t* buf, uint32_t len); - void flush(); - - uint32_t readAll(uint8_t* buf, uint32_t len); - uint32_t read(uint8_t* buf, uint32_t len); - - // log-file specific functions - void seekToChunk(int32_t chunk); - void seekToEnd(); - uint32_t getNumChunks(); - uint32_t getCurChunk(); - - // for changing the output file - void resetOutputFile(int fd, std::string filename, int64_t offset); - - // Setter/Getter functions for user-controllable options - void setReadBuffSize(uint32_t readBuffSize) { - if (readBuffSize) { - readBuffSize_ = readBuffSize; - } - } - uint32_t getReadBuffSize() { - return readBuffSize_; - } - - static const int32_t TAIL_READ_TIMEOUT = -1; - static const int32_t NO_TAIL_READ_TIMEOUT = 0; - void setReadTimeout(int32_t readTimeout) { - readTimeout_ = readTimeout; - } - int32_t getReadTimeout() { - return readTimeout_; - } - - void setChunkSize(uint32_t chunkSize) { - if (chunkSize) { - chunkSize_ = chunkSize; - } - } - uint32_t getChunkSize() { - return chunkSize_; - } - - void setEventBufferSize(uint32_t bufferSize) { - if (bufferAndThreadInitialized_) { - GlobalOutput("Cannot change the buffer size after writer thread started"); - return; - } - eventBufferSize_ = bufferSize; - } - - uint32_t getEventBufferSize() { - return eventBufferSize_; - } - - void setFlushMaxUs(uint32_t flushMaxUs) { - if (flushMaxUs) { - flushMaxUs_ = flushMaxUs; - } - } - uint32_t getFlushMaxUs() { - return flushMaxUs_; - } - - void setFlushMaxBytes(uint32_t flushMaxBytes) { - if (flushMaxBytes) { - flushMaxBytes_ = flushMaxBytes; - } - } - uint32_t getFlushMaxBytes() { - return flushMaxBytes_; - } - - void setMaxEventSize(uint32_t maxEventSize) { - maxEventSize_ = maxEventSize; - } - uint32_t getMaxEventSize() { - return maxEventSize_; - } - - void setMaxCorruptedEvents(uint32_t maxCorruptedEvents) { - maxCorruptedEvents_ = maxCorruptedEvents; - } - uint32_t getMaxCorruptedEvents() { - return maxCorruptedEvents_; - } - - void setEofSleepTimeUs(uint32_t eofSleepTime) { - if (eofSleepTime) { - eofSleepTime_ = eofSleepTime; - } - } - uint32_t getEofSleepTimeUs() { - return eofSleepTime_; - } - - private: - // helper functions for writing to a file - void enqueueEvent(const uint8_t* buf, uint32_t eventLen, bool blockUntilFlush); - bool swapEventBuffers(struct timespec* deadline); - bool initBufferAndWriteThread(); - - // control for writer thread - static void* startWriterThread(void* ptr) { - (((TFileTransport*)ptr)->writerThread()); - return 0; - } - void writerThread(); - - // helper functions for reading from a file - eventInfo* readEvent(); - - // event corruption-related functions - bool isEventCorrupted(); - void performRecovery(); - - // Utility functions - void openLogFile(); - void getNextFlushTime(struct timespec* ts_next_flush); - - // Class variables - readState readState_; - uint8_t* readBuff_; - eventInfo* currentEvent_; - - uint32_t readBuffSize_; - static const uint32_t DEFAULT_READ_BUFF_SIZE = 1 * 1024 * 1024; - - int32_t readTimeout_; - static const int32_t DEFAULT_READ_TIMEOUT_MS = 200; - - // size of chunks that file will be split up into - uint32_t chunkSize_; - static const uint32_t DEFAULT_CHUNK_SIZE = 16 * 1024 * 1024; - - // size of event buffers - uint32_t eventBufferSize_; - static const uint32_t DEFAULT_EVENT_BUFFER_SIZE = 10000; - - // max number of microseconds that can pass without flushing - uint32_t flushMaxUs_; - static const uint32_t DEFAULT_FLUSH_MAX_US = 3000000; - - // max number of bytes that can be written without flushing - uint32_t flushMaxBytes_; - static const uint32_t DEFAULT_FLUSH_MAX_BYTES = 1000 * 1024; - - // max event size - uint32_t maxEventSize_; - static const uint32_t DEFAULT_MAX_EVENT_SIZE = 0; - - // max number of corrupted events per chunk - uint32_t maxCorruptedEvents_; - static const uint32_t DEFAULT_MAX_CORRUPTED_EVENTS = 0; - - // sleep duration when EOF is hit - uint32_t eofSleepTime_; - static const uint32_t DEFAULT_EOF_SLEEP_TIME_US = 500 * 1000; - - // sleep duration when a corrupted event is encountered - uint32_t corruptedEventSleepTime_; - static const uint32_t DEFAULT_CORRUPTED_SLEEP_TIME_US = 1 * 1000 * 1000; - - // writer thread id - pthread_t writerThreadId_; - - // buffers to hold data before it is flushed. Each element of the buffer stores a msg that - // needs to be written to the file. The buffers are swapped by the writer thread. - TFileTransportBuffer *dequeueBuffer_; - TFileTransportBuffer *enqueueBuffer_; - - // conditions used to block when the buffer is full or empty - pthread_cond_t notFull_, notEmpty_; - volatile bool closing_; - - // To keep track of whether the buffer has been flushed - pthread_cond_t flushed_; - volatile bool forceFlush_; - - // Mutex that is grabbed when enqueueing and swapping the read/write buffers - pthread_mutex_t mutex_; - - // File information - std::string filename_; - int fd_; - - // Whether the writer thread and buffers have been initialized - bool bufferAndThreadInitialized_; - - // Offset within the file - off_t offset_; - - // event corruption information - uint32_t lastBadChunk_; - uint32_t numCorruptedEventsInChunk_; - - bool readOnly_; -}; - -// Exception thrown when EOF is hit -class TEOFException : public TTransportException { - public: - TEOFException(): - TTransportException(TTransportException::END_OF_FILE) {}; -}; - - -// wrapper class to process events from a file containing thrift events -class TFileProcessor { - public: - /** - * Constructor that defaults output transport to null transport - * - * @param processor processes log-file events - * @param protocolFactory protocol factory - * @param inputTransport file transport - */ - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - boost::shared_ptr inputTransport); - - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr inputProtocolFactory, - boost::shared_ptr outputProtocolFactory, - boost::shared_ptr inputTransport); - - /** - * Constructor - * - * @param processor processes log-file events - * @param protocolFactory protocol factory - * @param inputTransport input file transport - * @param output output transport - */ - TFileProcessor(boost::shared_ptr processor, - boost::shared_ptr protocolFactory, - boost::shared_ptr inputTransport, - boost::shared_ptr outputTransport); - - /** - * processes events from the file - * - * @param numEvents number of events to process (0 for unlimited) - * @param tail tails the file if true - */ - void process(uint32_t numEvents, bool tail); - - /** - * process events until the end of the chunk - * - */ - void processChunk(); - - private: - boost::shared_ptr processor_; - boost::shared_ptr inputProtocolFactory_; - boost::shared_ptr outputProtocolFactory_; - boost::shared_ptr inputTransport_; - boost::shared_ptr outputTransport_; -}; - - -}}} // apache::thrift::transport - -#endif // _THRIFT_TRANSPORT_TFILETRANSPORT_H_ diff --git service/include/thrift/transport/THttpClient.h service/include/thrift/transport/THttpClient.h deleted file mode 100644 index f4be4c1..0000000 --- service/include/thrift/transport/THttpClient.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ -#define _THRIFT_TRANSPORT_THTTPCLIENT_H_ 1 - -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * HTTP client implementation of the thrift transport. This was irritating - * to write, but the alternatives in C++ land are daunting. Linking CURL - * requires 23 dynamic libraries last time I checked (WTF?!?). All we have - * here is a VERY basic HTTP/1.1 client which supports HTTP 100 Continue, - * chunked transfer encoding, keepalive, etc. Tested against Apache. - * - */ -class THttpClient : public TTransport { - public: - THttpClient(boost::shared_ptr transport, std::string host, std::string path=""); - - THttpClient(std::string host, int port, std::string path=""); - - virtual ~THttpClient(); - - void open() { - transport_->open(); - } - - bool isOpen() { - return transport_->isOpen(); - } - - bool peek() { - return transport_->peek(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void readEnd(); - - void write(const uint8_t* buf, uint32_t len); - - void flush(); - - private: - void init(); - - protected: - - boost::shared_ptr transport_; - - TMemoryBuffer writeBuffer_; - TMemoryBuffer readBuffer_; - - std::string host_; - std::string path_; - - bool readHeaders_; - bool chunked_; - bool chunkedDone_; - uint32_t chunkSize_; - uint32_t contentLength_; - - char* httpBuf_; - uint32_t httpPos_; - uint32_t httpBufLen_; - uint32_t httpBufSize_; - - uint32_t readMoreData(); - char* readLine(); - - void readHeaders(); - void parseHeader(char* header); - bool parseStatusLine(char* status); - - uint32_t readChunked(); - void readChunkedFooters(); - uint32_t parseChunkSize(char* line); - - uint32_t readContent(uint32_t size); - - void refill(); - void shift(); - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_THTTPCLIENT_H_ diff --git service/include/thrift/transport/TServerSocket.h service/include/thrift/transport/TServerSocket.h deleted file mode 100644 index a6be017..0000000 --- service/include/thrift/transport/TServerSocket.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_ -#define _THRIFT_TRANSPORT_TSERVERSOCKET_H_ 1 - -#include "TServerTransport.h" -#include - -namespace apache { namespace thrift { namespace transport { - -class TSocket; - -/** - * Server socket implementation of TServerTransport. Wrapper around a unix - * socket listen and accept calls. - * - */ -class TServerSocket : public TServerTransport { - public: - TServerSocket(int port); - TServerSocket(int port, int sendTimeout, int recvTimeout); - - ~TServerSocket(); - - void setSendTimeout(int sendTimeout); - void setRecvTimeout(int recvTimeout); - - void setRetryLimit(int retryLimit); - void setRetryDelay(int retryDelay); - - void setTcpSendBuffer(int tcpSendBuffer); - void setTcpRecvBuffer(int tcpRecvBuffer); - - void listen(); - void close(); - - void interrupt(); - - protected: - boost::shared_ptr acceptImpl(); - - private: - int port_; - int serverSocket_; - int acceptBacklog_; - int sendTimeout_; - int recvTimeout_; - int retryLimit_; - int retryDelay_; - int tcpSendBuffer_; - int tcpRecvBuffer_; - - int intSock1_; - int intSock2_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_ diff --git service/include/thrift/transport/TServerTransport.h service/include/thrift/transport/TServerTransport.h deleted file mode 100644 index 40bbc6c..0000000 --- service/include/thrift/transport/TServerTransport.h +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ 1 - -#include "TTransport.h" -#include "TTransportException.h" -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Server transport framework. A server needs to have some facility for - * creating base transports to read/write from. - * - */ -class TServerTransport { - public: - virtual ~TServerTransport() {} - - /** - * Starts the server transport listening for new connections. Prior to this - * call most transports will not return anything when accept is called. - * - * @throws TTransportException if we were unable to listen - */ - virtual void listen() {} - - /** - * Gets a new dynamically allocated transport object and passes it to the - * caller. Note that it is the explicit duty of the caller to free the - * allocated object. The returned TTransport object must always be in the - * opened state. NULL should never be returned, instead an Exception should - * always be thrown. - * - * @return A new TTransport object - * @throws TTransportException if there is an error - */ - boost::shared_ptr accept() { - boost::shared_ptr result = acceptImpl(); - if (result == NULL) { - throw TTransportException("accept() may not return NULL"); - } - return result; - } - - /** - * For "smart" TServerTransport implementations that work in a multi - * threaded context this can be used to break out of an accept() call. - * It is expected that the transport will throw a TTransportException - * with the interrupted error code. - */ - virtual void interrupt() {} - - /** - * Closes this transport such that future calls to accept will do nothing. - */ - virtual void close() = 0; - - protected: - TServerTransport() {} - - /** - * Subclasses should implement this function for accept. - * - * @return A newly allocated TTransport object - * @throw TTransportException If an error occurs - */ - virtual boost::shared_ptr acceptImpl() = 0; - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSERVERTRANSPORT_H_ diff --git service/include/thrift/transport/TShortReadTransport.h service/include/thrift/transport/TShortReadTransport.h deleted file mode 100644 index 3df8a57..0000000 --- service/include/thrift/transport/TShortReadTransport.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ 1 - -#include - -#include - -namespace apache { namespace thrift { namespace transport { namespace test { - -/** - * This class is only meant for testing. It wraps another transport. - * Calls to read are passed through with some probability. Otherwise, - * the read amount is randomly reduced before being passed through. - * - */ -class TShortReadTransport : public TTransport { - public: - TShortReadTransport(boost::shared_ptr transport, double full_prob) - : transport_(transport) - , fullProb_(full_prob) - {} - - bool isOpen() { - return transport_->isOpen(); - } - - bool peek() { - return transport_->peek(); - } - - void open() { - transport_->open(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len) { - if (len == 0) { - return 0; - } - - if (rand()/(double)RAND_MAX >= fullProb_) { - len = 1 + rand()%len; - } - return transport_->read(buf, len); - } - - void write(const uint8_t* buf, uint32_t len) { - transport_->write(buf, len); - } - - void flush() { - transport_->flush(); - } - - const uint8_t* borrow(uint8_t* buf, uint32_t* len) { - return transport_->borrow(buf, len); - } - - void consume(uint32_t len) { - return transport_->consume(len); - } - - boost::shared_ptr getUnderlyingTransport() { - return transport_; - } - - protected: - boost::shared_ptr transport_; - double fullProb_; -}; - -}}}} // apache::thrift::transport::test - -#endif // #ifndef _THRIFT_TRANSPORT_TSHORTREADTRANSPORT_H_ diff --git service/include/thrift/transport/TSimpleFileTransport.h service/include/thrift/transport/TSimpleFileTransport.h deleted file mode 100644 index 6cc52ea..0000000 --- service/include/thrift/transport/TSimpleFileTransport.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ -#define _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ 1 - -#include "TFDTransport.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * Dead-simple wrapper around a file. - * - * Writeable files are opened with O_CREAT and O_APPEND - */ -class TSimpleFileTransport : public TFDTransport { - public: - TSimpleFileTransport(const std::string& path, - bool read = true, - bool write = false); -}; - -}}} // apache::thrift::transport - -#endif // _THRIFT_TRANSPORT_TSIMPLEFILETRANSPORT_H_ diff --git service/include/thrift/transport/TSocket.h service/include/thrift/transport/TSocket.h deleted file mode 100644 index b0f445a..0000000 --- service/include/thrift/transport/TSocket.h +++ /dev/null @@ -1,242 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSOCKET_H_ -#define _THRIFT_TRANSPORT_TSOCKET_H_ 1 - -#include -#include - -#include "TTransport.h" -#include "TServerSocket.h" - -namespace apache { namespace thrift { namespace transport { - -/** - * TCP Socket implementation of the TTransport interface. - * - */ -class TSocket : public TTransport { - /** - * We allow the TServerSocket acceptImpl() method to access the private - * members of a socket so that it can access the TSocket(int socket) - * constructor which creates a socket object from the raw UNIX socket - * handle. - */ - friend class TServerSocket; - - public: - /** - * Constructs a new socket. Note that this does NOT actually connect the - * socket. - * - */ - TSocket(); - - /** - * Constructs a new socket. Note that this does NOT actually connect the - * socket. - * - * @param host An IP address or hostname to connect to - * @param port The port to connect on - */ - TSocket(std::string host, int port); - - /** - * Destroyes the socket object, closing it if necessary. - */ - virtual ~TSocket(); - - /** - * Whether the socket is alive. - * - * @return Is the socket alive? - */ - bool isOpen(); - - /** - * Calls select on the socket to see if there is more data available. - */ - bool peek(); - - /** - * Creates and opens the UNIX socket. - * - * @throws TTransportException If the socket could not connect - */ - virtual void open(); - - /** - * Shuts down communications on the socket. - */ - void close(); - - /** - * Reads from the underlying socket. - */ - uint32_t read(uint8_t* buf, uint32_t len); - - /** - * Writes to the underlying socket. - */ - void write(const uint8_t* buf, uint32_t len); - - /** - * Get the host that the socket is connected to - * - * @return string host identifier - */ - std::string getHost(); - - /** - * Get the port that the socket is connected to - * - * @return int port number - */ - int getPort(); - - /** - * Set the host that socket will connect to - * - * @param host host identifier - */ - void setHost(std::string host); - - /** - * Set the port that socket will connect to - * - * @param port port number - */ - void setPort(int port); - - /** - * Controls whether the linger option is set on the socket. - * - * @param on Whether SO_LINGER is on - * @param linger If linger is active, the number of seconds to linger for - */ - void setLinger(bool on, int linger); - - /** - * Whether to enable/disable Nagle's algorithm. - * - * @param noDelay Whether or not to disable the algorithm. - * @return - */ - void setNoDelay(bool noDelay); - - /** - * Set the connect timeout - */ - void setConnTimeout(int ms); - - /** - * Set the receive timeout - */ - void setRecvTimeout(int ms); - - /** - * Set the send timeout - */ - void setSendTimeout(int ms); - - /** - * Set the max number of recv retries in case of an EAGAIN - * error - */ - void setMaxRecvRetries(int maxRecvRetries); - - /** - * Get socket information formated as a string - */ - std::string getSocketInfo(); - - /** - * Returns the DNS name of the host to which the socket is connected - */ - std::string getPeerHost(); - - /** - * Returns the address of the host to which the socket is connected - */ - std::string getPeerAddress(); - - /** - * Returns the port of the host to which the socket is connected - **/ - int getPeerPort(); - - - protected: - /** - * Constructor to create socket from raw UNIX handle. Never called directly - * but used by the TServerSocket class. - */ - TSocket(int socket); - - /** connect, called by open */ - void openConnection(struct addrinfo *res); - - /** Host to connect to */ - std::string host_; - - /** Peer hostname */ - std::string peerHost_; - - /** Peer address */ - std::string peerAddress_; - - /** Peer port */ - int peerPort_; - - /** Port number to connect on */ - int port_; - - /** Underlying UNIX socket handle */ - int socket_; - - /** Connect timeout in ms */ - int connTimeout_; - - /** Send timeout in ms */ - int sendTimeout_; - - /** Recv timeout in ms */ - int recvTimeout_; - - /** Linger on */ - bool lingerOn_; - - /** Linger val */ - int lingerVal_; - - /** Nodelay */ - bool noDelay_; - - /** Recv EGAIN retries */ - int maxRecvRetries_; - - /** Recv timeout timeval */ - struct timeval recvTimeval_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSOCKET_H_ - diff --git service/include/thrift/transport/TSocketPool.h service/include/thrift/transport/TSocketPool.h deleted file mode 100644 index 8c50669..0000000 --- service/include/thrift/transport/TSocketPool.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_ -#define _THRIFT_TRANSPORT_TSOCKETPOOL_H_ 1 - -#include -#include "TSocket.h" - -namespace apache { namespace thrift { namespace transport { - - /** - * Class to hold server information for TSocketPool - * - */ -class TSocketPoolServer { - - public: - /** - * Default constructor for server info - */ - TSocketPoolServer(); - - /** - * Constructor for TSocketPool server - */ - TSocketPoolServer(const std::string &host, int port); - - // Host name - std::string host_; - - // Port to connect on - int port_; - - // Socket for the server - int socket_; - - // Last time connecting to this server failed - int lastFailTime_; - - // Number of consecutive times connecting to this server failed - int consecutiveFailures_; -}; - -/** - * TCP Socket implementation of the TTransport interface. - * - */ -class TSocketPool : public TSocket { - - public: - - /** - * Socket pool constructor - */ - TSocketPool(); - - /** - * Socket pool constructor - * - * @param hosts list of host names - * @param ports list of port names - */ - TSocketPool(const std::vector &hosts, - const std::vector &ports); - - /** - * Socket pool constructor - * - * @param servers list of pairs of host name and port - */ - TSocketPool(const std::vector >& servers); - - /** - * Socket pool constructor - * - * @param servers list of TSocketPoolServers - */ - TSocketPool(const std::vector< boost::shared_ptr >& servers); - - /** - * Socket pool constructor - * - * @param host single host - * @param port single port - */ - TSocketPool(const std::string& host, int port); - - /** - * Destroyes the socket object, closing it if necessary. - */ - virtual ~TSocketPool(); - - /** - * Add a server to the pool - */ - void addServer(const std::string& host, int port); - - /** - * Set list of servers in this pool - */ - void setServers(const std::vector< boost::shared_ptr >& servers); - - /** - * Get list of servers in this pool - */ - void getServers(std::vector< boost::shared_ptr >& servers); - - /** - * Sets how many times to keep retrying a host in the connect function. - */ - void setNumRetries(int numRetries); - - /** - * Sets how long to wait until retrying a host if it was marked down - */ - void setRetryInterval(int retryInterval); - - /** - * Sets how many times to keep retrying a host before marking it as down. - */ - void setMaxConsecutiveFailures(int maxConsecutiveFailures); - - /** - * Turns randomization in connect order on or off. - */ - void setRandomize(bool randomize); - - /** - * Whether to always try the last server. - */ - void setAlwaysTryLast(bool alwaysTryLast); - - /** - * Creates and opens the UNIX socket. - */ - void open(); - - /* - * Closes the UNIX socket - */ - void close(); - - protected: - - void setCurrentServer(const boost::shared_ptr &server); - - /** List of servers to connect to */ - std::vector< boost::shared_ptr > servers_; - - /** Current server */ - boost::shared_ptr currentServer_; - - /** How many times to retry each host in connect */ - int numRetries_; - - /** Retry interval in seconds, how long to not try a host if it has been - * marked as down. - */ - int retryInterval_; - - /** Max consecutive failures before marking a host down. */ - int maxConsecutiveFailures_; - - /** Try hosts in order? or Randomized? */ - bool randomize_; - - /** Always try last host, even if marked down? */ - bool alwaysTryLast_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TSOCKETPOOL_H_ - diff --git service/include/thrift/transport/TTransport.h service/include/thrift/transport/TTransport.h deleted file mode 100644 index eb0d5df..0000000 --- service/include/thrift/transport/TTransport.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TTRANSPORT_H_ 1 - -#include -#include -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Generic interface for a method of transporting data. A TTransport may be - * capable of either reading or writing, but not necessarily both. - * - */ -class TTransport { - public: - /** - * Virtual deconstructor. - */ - virtual ~TTransport() {} - - /** - * Whether this transport is open. - */ - virtual bool isOpen() { - return false; - } - - /** - * Tests whether there is more data to read or if the remote side is - * still open. By default this is true whenever the transport is open, - * but implementations should add logic to test for this condition where - * possible (i.e. on a socket). - * This is used by a server to check if it should listen for another - * request. - */ - virtual bool peek() { - return isOpen(); - } - - /** - * Opens the transport for communications. - * - * @return bool Whether the transport was successfully opened - * @throws TTransportException if opening failed - */ - virtual void open() { - throw TTransportException(TTransportException::NOT_OPEN, "Cannot open base TTransport."); - } - - /** - * Closes the transport. - */ - virtual void close() { - throw TTransportException(TTransportException::NOT_OPEN, "Cannot close base TTransport."); - } - - /** - * Attempt to read up to the specified number of bytes into the string. - * - * @param buf Reference to the location to write the data - * @param len How many bytes to read - * @return How many bytes were actually read - * @throws TTransportException If an error occurs - */ - virtual uint32_t read(uint8_t* /* buf */, uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot read."); - } - - /** - * Reads the given amount of data in its entirety no matter what. - * - * @param s Reference to location for read data - * @param len How many bytes to read - * @return How many bytes read, which must be equal to size - * @throws TTransportException If insufficient data was read - */ - virtual uint32_t readAll(uint8_t* buf, uint32_t len) { - uint32_t have = 0; - uint32_t get = 0; - - while (have < len) { - get = read(buf+have, len-have); - if (get <= 0) { - throw TTransportException("No more data to read."); - } - have += get; - } - - return have; - } - - /** - * Called when read is completed. - * This can be over-ridden to perform a transport-specific action - * e.g. logging the request to a file - * - */ - virtual void readEnd() { - // default behaviour is to do nothing - return; - } - - /** - * Writes the string in its entirety to the buffer. - * - * @param buf The data to write out - * @throws TTransportException if an error occurs - */ - virtual void write(const uint8_t* /* buf */, uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot write."); - } - - /** - * Called when write is completed. - * This can be over-ridden to perform a transport-specific action - * at the end of a request. - * - */ - virtual void writeEnd() { - // default behaviour is to do nothing - return; - } - - /** - * Flushes any pending data to be written. Typically used with buffered - * transport mechanisms. - * - * @throws TTransportException if an error occurs - */ - virtual void flush() {} - - /** - * Attempts to return a pointer to \c len bytes, possibly copied into \c buf. - * Does not consume the bytes read (i.e.: a later read will return the same - * data). This method is meant to support protocols that need to read - * variable-length fields. They can attempt to borrow the maximum amount of - * data that they will need, then consume (see next method) what they - * actually use. Some transports will not support this method and others - * will fail occasionally, so protocols must be prepared to use read if - * borrow fails. - * - * @oaram buf A buffer where the data can be stored if needed. - * If borrow doesn't return buf, then the contents of - * buf after the call are undefined. - * @param len *len should initially contain the number of bytes to borrow. - * If borrow succeeds, *len will contain the number of bytes - * available in the returned pointer. This will be at least - * what was requested, but may be more if borrow returns - * a pointer to an internal buffer, rather than buf. - * If borrow fails, the contents of *len are undefined. - * @return If the borrow succeeds, return a pointer to the borrowed data. - * This might be equal to \c buf, or it might be a pointer into - * the transport's internal buffers. - * @throws TTransportException if an error occurs - */ - virtual const uint8_t* borrow(uint8_t* /* buf */, uint32_t* /* len */) { - return NULL; - } - - /** - * Remove len bytes from the transport. This should always follow a borrow - * of at least len bytes, and should always succeed. - * TODO(dreiss): Is there any transport that could borrow but fail to - * consume, or that would require a buffer to dump the consumed data? - * - * @param len How many bytes to consume - * @throws TTransportException If an error occurs - */ - virtual void consume(uint32_t /* len */) { - throw TTransportException(TTransportException::NOT_OPEN, "Base TTransport cannot consume."); - } - - protected: - /** - * Simple constructor. - */ - TTransport() {} -}; - -/** - * Generic factory class to make an input and output transport out of a - * source transport. Commonly used inside servers to make input and output - * streams out of raw clients. - * - */ -class TTransportFactory { - public: - TTransportFactory() {} - - virtual ~TTransportFactory() {} - - /** - * Default implementation does nothing, just returns the transport given. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr trans) { - return trans; - } - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORT_H_ diff --git service/include/thrift/transport/TTransportException.h service/include/thrift/transport/TTransportException.h deleted file mode 100644 index 330785c..0000000 --- service/include/thrift/transport/TTransportException.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ -#define _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ 1 - -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * Class to encapsulate all the possible types of transport errors that may - * occur in various transport systems. This provides a sort of generic - * wrapper around the shitty UNIX E_ error codes that lets a common code - * base of error handling to be used for various types of transports, i.e. - * pipes etc. - * - */ -class TTransportException : public apache::thrift::TException { - public: - /** - * Error codes for the various types of exceptions. - */ - enum TTransportExceptionType - { UNKNOWN = 0 - , NOT_OPEN = 1 - , ALREADY_OPEN = 2 - , TIMED_OUT = 3 - , END_OF_FILE = 4 - , INTERRUPTED = 5 - , BAD_ARGS = 6 - , CORRUPTED_DATA = 7 - , INTERNAL_ERROR = 8 - }; - - TTransportException() : - apache::thrift::TException(), - type_(UNKNOWN) {} - - TTransportException(TTransportExceptionType type) : - apache::thrift::TException(), - type_(type) {} - - TTransportException(const std::string& message) : - apache::thrift::TException(message), - type_(UNKNOWN) {} - - TTransportException(TTransportExceptionType type, const std::string& message) : - apache::thrift::TException(message), - type_(type) {} - - TTransportException(TTransportExceptionType type, - const std::string& message, - int errno_copy) : - apache::thrift::TException(message + ": " + TOutput::strerror_s(errno_copy)), - type_(type) {} - - virtual ~TTransportException() throw() {} - - /** - * Returns an error code that provides information about the type of error - * that has occurred. - * - * @return Error code - */ - TTransportExceptionType getType() const throw() { - return type_; - } - - virtual const char* what() const throw() { - if (message_.empty()) { - switch (type_) { - case UNKNOWN : return "TTransportException: Unknown transport exception"; - case NOT_OPEN : return "TTransportException: Transport not open"; - case ALREADY_OPEN : return "TTransportException: Transport already open"; - case TIMED_OUT : return "TTransportException: Timed out"; - case END_OF_FILE : return "TTransportException: End of file"; - case INTERRUPTED : return "TTransportException: Interrupted"; - case BAD_ARGS : return "TTransportException: Invalid arguments"; - case CORRUPTED_DATA : return "TTransportException: Corrupted Data"; - case INTERNAL_ERROR : return "TTransportException: Internal error"; - default : return "TTransportException: (Invalid exception type)"; - } - } else { - return message_.c_str(); - } - } - - protected: - /** Just like strerror_r but returns a C++ string object. */ - std::string strerror_s(int errno_copy); - - /** Error code */ - TTransportExceptionType type_; - -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTEXCEPTION_H_ diff --git service/include/thrift/transport/TTransportUtils.h service/include/thrift/transport/TTransportUtils.h deleted file mode 100644 index d65c916..0000000 --- service/include/thrift/transport/TTransportUtils.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ -#define _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ 1 - -#include -#include -#include -#include -#include -// Include the buffered transports that used to be defined here. -#include -#include - -namespace apache { namespace thrift { namespace transport { - -/** - * The null transport is a dummy transport that doesn't actually do anything. - * It's sort of an analogy to /dev/null, you can never read anything from it - * and it will let you write anything you want to it, though it won't actually - * go anywhere. - * - */ -class TNullTransport : public TTransport { - public: - TNullTransport() {} - - ~TNullTransport() {} - - bool isOpen() { - return true; - } - - void open() {} - - void write(const uint8_t* /* buf */, uint32_t /* len */) { - return; - } - -}; - - -/** - * TPipedTransport. This transport allows piping of a request from one - * transport to another either when readEnd() or writeEnd(). The typical - * use case for this is to log a request or a reply to disk. - * The underlying buffer expands to a keep a copy of the entire - * request/response. - * - */ -class TPipedTransport : virtual public TTransport { - public: - TPipedTransport(boost::shared_ptr srcTrans, - boost::shared_ptr dstTrans) : - srcTrans_(srcTrans), - dstTrans_(dstTrans), - rBufSize_(512), rPos_(0), rLen_(0), - wBufSize_(512), wLen_(0) { - - // default is to to pipe the request when readEnd() is called - pipeOnRead_ = true; - pipeOnWrite_ = false; - - rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_); - wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_); - } - - TPipedTransport(boost::shared_ptr srcTrans, - boost::shared_ptr dstTrans, - uint32_t sz) : - srcTrans_(srcTrans), - dstTrans_(dstTrans), - rBufSize_(512), rPos_(0), rLen_(0), - wBufSize_(sz), wLen_(0) { - - rBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * rBufSize_); - wBuf_ = (uint8_t*) std::malloc(sizeof(uint8_t) * wBufSize_); - } - - ~TPipedTransport() { - std::free(rBuf_); - std::free(wBuf_); - } - - bool isOpen() { - return srcTrans_->isOpen(); - } - - bool peek() { - if (rPos_ >= rLen_) { - // Double the size of the underlying buffer if it is full - if (rLen_ == rBufSize_) { - rBufSize_ *=2; - rBuf_ = (uint8_t *)std::realloc(rBuf_, sizeof(uint8_t) * rBufSize_); - } - - // try to fill up the buffer - rLen_ += srcTrans_->read(rBuf_+rPos_, rBufSize_ - rPos_); - } - return (rLen_ > rPos_); - } - - - void open() { - srcTrans_->open(); - } - - void close() { - srcTrans_->close(); - } - - void setPipeOnRead(bool pipeVal) { - pipeOnRead_ = pipeVal; - } - - void setPipeOnWrite(bool pipeVal) { - pipeOnWrite_ = pipeVal; - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void readEnd() { - - if (pipeOnRead_) { - dstTrans_->write(rBuf_, rPos_); - dstTrans_->flush(); - } - - srcTrans_->readEnd(); - - // If requests are being pipelined, copy down our read-ahead data, - // then reset our state. - int read_ahead = rLen_ - rPos_; - memcpy(rBuf_, rBuf_ + rPos_, read_ahead); - rPos_ = 0; - rLen_ = read_ahead; - } - - void write(const uint8_t* buf, uint32_t len); - - void writeEnd() { - if (pipeOnWrite_) { - dstTrans_->write(wBuf_, wLen_); - dstTrans_->flush(); - } - } - - void flush(); - - boost::shared_ptr getTargetTransport() { - return dstTrans_; - } - - protected: - boost::shared_ptr srcTrans_; - boost::shared_ptr dstTrans_; - - uint8_t* rBuf_; - uint32_t rBufSize_; - uint32_t rPos_; - uint32_t rLen_; - - uint8_t* wBuf_; - uint32_t wBufSize_; - uint32_t wLen_; - - bool pipeOnRead_; - bool pipeOnWrite_; -}; - - -/** - * Wraps a transport into a pipedTransport instance. - * - */ -class TPipedTransportFactory : public TTransportFactory { - public: - TPipedTransportFactory() {} - TPipedTransportFactory(boost::shared_ptr dstTrans) { - initializeTargetTransport(dstTrans); - } - virtual ~TPipedTransportFactory() {} - - /** - * Wraps the base transport into a piped transport. - */ - virtual boost::shared_ptr getTransport(boost::shared_ptr srcTrans) { - return boost::shared_ptr(new TPipedTransport(srcTrans, dstTrans_)); - } - - virtual void initializeTargetTransport(boost::shared_ptr dstTrans) { - if (dstTrans_.get() == NULL) { - dstTrans_ = dstTrans; - } else { - throw TException("Target transport already initialized"); - } - } - - protected: - boost::shared_ptr dstTrans_; -}; - -/** - * TPipedFileTransport. This is just like a TTransport, except that - * it is a templatized class, so that clients who rely on a specific - * TTransport can still access the original transport. - * - */ -class TPipedFileReaderTransport : public TPipedTransport, - public TFileReaderTransport { - public: - TPipedFileReaderTransport(boost::shared_ptr srcTrans, boost::shared_ptr dstTrans); - - ~TPipedFileReaderTransport(); - - // TTransport functions - bool isOpen(); - bool peek(); - void open(); - void close(); - uint32_t read(uint8_t* buf, uint32_t len); - uint32_t readAll(uint8_t* buf, uint32_t len); - void readEnd(); - void write(const uint8_t* buf, uint32_t len); - void writeEnd(); - void flush(); - - // TFileReaderTransport functions - int32_t getReadTimeout(); - void setReadTimeout(int32_t readTimeout); - uint32_t getNumChunks(); - uint32_t getCurChunk(); - void seekToChunk(int32_t chunk); - void seekToEnd(); - - protected: - // shouldn't be used - TPipedFileReaderTransport(); - boost::shared_ptr srcTrans_; -}; - -/** - * Creates a TPipedFileReaderTransport from a filepath and a destination transport - * - */ -class TPipedFileReaderTransportFactory : public TPipedTransportFactory { - public: - TPipedFileReaderTransportFactory() {} - TPipedFileReaderTransportFactory(boost::shared_ptr dstTrans) - : TPipedTransportFactory(dstTrans) - {} - virtual ~TPipedFileReaderTransportFactory() {} - - boost::shared_ptr getTransport(boost::shared_ptr srcTrans) { - boost::shared_ptr pFileReaderTransport = boost::dynamic_pointer_cast(srcTrans); - if (pFileReaderTransport.get() != NULL) { - return getFileReaderTransport(pFileReaderTransport); - } else { - return boost::shared_ptr(); - } - } - - boost::shared_ptr getFileReaderTransport(boost::shared_ptr srcTrans) { - return boost::shared_ptr(new TPipedFileReaderTransport(srcTrans, dstTrans_)); - } -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TTRANSPORTUTILS_H_ diff --git service/include/thrift/transport/TZlibTransport.h service/include/thrift/transport/TZlibTransport.h deleted file mode 100644 index 1439d9d..0000000 --- service/include/thrift/transport/TZlibTransport.h +++ /dev/null @@ -1,219 +0,0 @@ -/* - * 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. - */ - -#ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ -#define _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ 1 - -#include -#include - -struct z_stream_s; - -namespace apache { namespace thrift { namespace transport { - -class TZlibTransportException : public TTransportException { - public: - TZlibTransportException(int status, const char* msg) : - TTransportException(TTransportException::INTERNAL_ERROR, - errorMessage(status, msg)), - zlib_status_(status), - zlib_msg_(msg == NULL ? "(null)" : msg) {} - - virtual ~TZlibTransportException() throw() {} - - int getZlibStatus() { return zlib_status_; } - std::string getZlibMessage() { return zlib_msg_; } - - static std::string errorMessage(int status, const char* msg) { - std::string rv = "zlib error: "; - if (msg) { - rv += msg; - } else { - rv += "(no message)"; - } - rv += " (status = "; - rv += boost::lexical_cast(status); - rv += ")"; - return rv; - } - - int zlib_status_; - std::string zlib_msg_; -}; - -/** - * This transport uses zlib's compressed format on the "far" side. - * - * There are two kinds of TZlibTransport objects: - * - Standalone objects are used to encode self-contained chunks of data - * (like structures). They include checksums. - * - Non-standalone transports are used for RPC. They are not implemented yet. - * - * TODO(dreiss): Don't do an extra copy of the compressed data if - * the underlying transport is TBuffered or TMemory. - * - */ -class TZlibTransport : public TTransport { - public: - - /** - * @param transport The transport to read compressed data from - * and write compressed data to. - * @param use_for_rpc True if this object will be used for RPC, - * false if this is a standalone object. - * @param urbuf_size Uncompressed buffer size for reading. - * @param crbuf_size Compressed buffer size for reading. - * @param uwbuf_size Uncompressed buffer size for writing. - * @param cwbuf_size Compressed buffer size for writing. - * - * TODO(dreiss): Write a constructor that isn't a pain. - */ - TZlibTransport(boost::shared_ptr transport, - bool use_for_rpc, - int urbuf_size = DEFAULT_URBUF_SIZE, - int crbuf_size = DEFAULT_CRBUF_SIZE, - int uwbuf_size = DEFAULT_UWBUF_SIZE, - int cwbuf_size = DEFAULT_CWBUF_SIZE) : - transport_(transport), - standalone_(!use_for_rpc), - urpos_(0), - uwpos_(0), - input_ended_(false), - output_flushed_(false), - urbuf_size_(urbuf_size), - crbuf_size_(crbuf_size), - uwbuf_size_(uwbuf_size), - cwbuf_size_(cwbuf_size), - urbuf_(NULL), - crbuf_(NULL), - uwbuf_(NULL), - cwbuf_(NULL), - rstream_(NULL), - wstream_(NULL) - { - - if (!standalone_) { - throw TTransportException( - TTransportException::BAD_ARGS, - "TZLibTransport has not been tested for RPC."); - } - - if (uwbuf_size_ < MIN_DIRECT_DEFLATE_SIZE) { - // Have to copy this into a local because of a linking issue. - int minimum = MIN_DIRECT_DEFLATE_SIZE; - throw TTransportException( - TTransportException::BAD_ARGS, - "TZLibTransport: uncompressed write buffer must be at least" - + boost::lexical_cast(minimum) + "."); - } - - try { - urbuf_ = new uint8_t[urbuf_size]; - crbuf_ = new uint8_t[crbuf_size]; - uwbuf_ = new uint8_t[uwbuf_size]; - cwbuf_ = new uint8_t[cwbuf_size]; - - // Don't call this outside of the constructor. - initZlib(); - - } catch (...) { - delete[] urbuf_; - delete[] crbuf_; - delete[] uwbuf_; - delete[] cwbuf_; - throw; - } - } - - // Don't call this outside of the constructor. - void initZlib(); - - ~TZlibTransport(); - - bool isOpen(); - - void open() { - transport_->open(); - } - - void close() { - transport_->close(); - } - - uint32_t read(uint8_t* buf, uint32_t len); - - void write(const uint8_t* buf, uint32_t len); - - void flush(); - - const uint8_t* borrow(uint8_t* buf, uint32_t* len); - - void consume(uint32_t len); - - void verifyChecksum(); - - /** - * TODO(someone_smart): Choose smart defaults. - */ - static const int DEFAULT_URBUF_SIZE = 128; - static const int DEFAULT_CRBUF_SIZE = 1024; - static const int DEFAULT_UWBUF_SIZE = 128; - static const int DEFAULT_CWBUF_SIZE = 1024; - - protected: - - inline void checkZlibRv(int status, const char* msg); - inline void checkZlibRvNothrow(int status, const char* msg); - inline int readAvail(); - void flushToZlib(const uint8_t* buf, int len, bool finish = false); - - // Writes smaller than this are buffered up. - // Larger (or equal) writes are dumped straight to zlib. - static const int MIN_DIRECT_DEFLATE_SIZE = 32; - - boost::shared_ptr transport_; - bool standalone_; - - int urpos_; - int uwpos_; - - /// True iff zlib has reached the end of a stream. - /// This is only ever true in standalone protcol objects. - bool input_ended_; - /// True iff we have flushed the output stream. - /// This is only ever true in standalone protcol objects. - bool output_flushed_; - - int urbuf_size_; - int crbuf_size_; - int uwbuf_size_; - int cwbuf_size_; - - uint8_t* urbuf_; - uint8_t* crbuf_; - uint8_t* uwbuf_; - uint8_t* cwbuf_; - - struct z_stream_s* rstream_; - struct z_stream_s* wstream_; -}; - -}}} // apache::thrift::transport - -#endif // #ifndef _THRIFT_TRANSPORT_TZLIBTRANSPORT_H_ diff --git service/src/gen-cpp/ThriftHive.cpp service/src/gen-cpp/ThriftHive.cpp index 724e4cb..6ecf2ca 100644 --- service/src/gen-cpp/ThriftHive.cpp +++ service/src/gen-cpp/ThriftHive.cpp @@ -7,28 +7,28 @@ namespace Apache { namespace Hadoop { namespace Hive { -uint32_t ThriftHive_execute_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_execute_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->query); this->__isset.query = true; } else { @@ -47,10 +47,10 @@ uint32_t ThriftHive_execute_args::read(apache::thrift::protocol::TProtocol* ipro return xfer; } -uint32_t ThriftHive_execute_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_execute_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_args"); - xfer += oprot->writeFieldBegin("query", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->query); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -58,10 +58,10 @@ uint32_t ThriftHive_execute_args::write(apache::thrift::protocol::TProtocol* opr return xfer; } -uint32_t ThriftHive_execute_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_execute_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_pargs"); - xfer += oprot->writeFieldBegin("query", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("query", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString((*(this->query))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -69,28 +69,28 @@ uint32_t ThriftHive_execute_pargs::write(apache::thrift::protocol::TProtocol* op return xfer; } -uint32_t ThriftHive_execute_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_execute_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -109,14 +109,14 @@ uint32_t ThriftHive_execute_result::read(apache::thrift::protocol::TProtocol* ip return xfer; } -uint32_t ThriftHive_execute_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_execute_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_execute_result"); if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -125,28 +125,28 @@ uint32_t ThriftHive_execute_result::write(apache::thrift::protocol::TProtocol* o return xfer; } -uint32_t ThriftHive_execute_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_execute_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -165,22 +165,22 @@ uint32_t ThriftHive_execute_presult::read(apache::thrift::protocol::TProtocol* i return xfer; } -uint32_t ThriftHive_fetchOne_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchOne_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -197,7 +197,7 @@ uint32_t ThriftHive_fetchOne_args::read(apache::thrift::protocol::TProtocol* ipr return xfer; } -uint32_t ThriftHive_fetchOne_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchOne_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_args"); xfer += oprot->writeFieldStop(); @@ -205,7 +205,7 @@ uint32_t ThriftHive_fetchOne_args::write(apache::thrift::protocol::TProtocol* op return xfer; } -uint32_t ThriftHive_fetchOne_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchOne_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_pargs"); xfer += oprot->writeFieldStop(); @@ -213,28 +213,28 @@ uint32_t ThriftHive_fetchOne_pargs::write(apache::thrift::protocol::TProtocol* o return xfer; } -uint32_t ThriftHive_fetchOne_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchOne_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->success); this->__isset.success = true; } else { @@ -242,7 +242,7 @@ uint32_t ThriftHive_fetchOne_result::read(apache::thrift::protocol::TProtocol* i } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -261,18 +261,18 @@ uint32_t ThriftHive_fetchOne_result::read(apache::thrift::protocol::TProtocol* i return xfer; } -uint32_t ThriftHive_fetchOne_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchOne_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchOne_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRING, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRING, 0); xfer += oprot->writeString(this->success); xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -281,28 +281,28 @@ uint32_t ThriftHive_fetchOne_result::write(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_fetchOne_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchOne_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString((*(this->success))); this->__isset.success = true; } else { @@ -310,7 +310,7 @@ uint32_t ThriftHive_fetchOne_presult::read(apache::thrift::protocol::TProtocol* } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -329,28 +329,28 @@ uint32_t ThriftHive_fetchOne_presult::read(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_fetchN_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchN_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->numRows); this->__isset.numRows = true; } else { @@ -369,10 +369,10 @@ uint32_t ThriftHive_fetchN_args::read(apache::thrift::protocol::TProtocol* iprot return xfer; } -uint32_t ThriftHive_fetchN_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchN_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_args"); - xfer += oprot->writeFieldBegin("numRows", apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->numRows); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -380,10 +380,10 @@ uint32_t ThriftHive_fetchN_args::write(apache::thrift::protocol::TProtocol* opro return xfer; } -uint32_t ThriftHive_fetchN_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchN_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_pargs"); - xfer += oprot->writeFieldBegin("numRows", apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeFieldBegin("numRows", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((*(this->numRows))); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -391,32 +391,32 @@ uint32_t ThriftHive_fetchN_pargs::write(apache::thrift::protocol::TProtocol* opr return xfer; } -uint32_t ThriftHive_fetchN_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchN_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size1; - apache::thrift::protocol::TType _etype4; + ::apache::thrift::protocol::TType _etype4; iprot->readListBegin(_etype4, _size1); this->success.resize(_size1); uint32_t _i5; @@ -432,7 +432,7 @@ uint32_t ThriftHive_fetchN_result::read(apache::thrift::protocol::TProtocol* ipr } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -451,16 +451,16 @@ uint32_t ThriftHive_fetchN_result::read(apache::thrift::protocol::TProtocol* ipr return xfer; } -uint32_t ThriftHive_fetchN_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchN_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchN_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter6; for (_iter6 = this->success.begin(); _iter6 != this->success.end(); ++_iter6) { @@ -470,7 +470,7 @@ uint32_t ThriftHive_fetchN_result::write(apache::thrift::protocol::TProtocol* op } xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -479,32 +479,32 @@ uint32_t ThriftHive_fetchN_result::write(apache::thrift::protocol::TProtocol* op return xfer; } -uint32_t ThriftHive_fetchN_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchN_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size7; - apache::thrift::protocol::TType _etype10; + ::apache::thrift::protocol::TType _etype10; iprot->readListBegin(_etype10, _size7); (*(this->success)).resize(_size7); uint32_t _i11; @@ -520,7 +520,7 @@ uint32_t ThriftHive_fetchN_presult::read(apache::thrift::protocol::TProtocol* ip } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -539,22 +539,22 @@ uint32_t ThriftHive_fetchN_presult::read(apache::thrift::protocol::TProtocol* ip return xfer; } -uint32_t ThriftHive_fetchAll_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchAll_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -571,7 +571,7 @@ uint32_t ThriftHive_fetchAll_args::read(apache::thrift::protocol::TProtocol* ipr return xfer; } -uint32_t ThriftHive_fetchAll_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchAll_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_args"); xfer += oprot->writeFieldStop(); @@ -579,7 +579,7 @@ uint32_t ThriftHive_fetchAll_args::write(apache::thrift::protocol::TProtocol* op return xfer; } -uint32_t ThriftHive_fetchAll_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchAll_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_pargs"); xfer += oprot->writeFieldStop(); @@ -587,32 +587,32 @@ uint32_t ThriftHive_fetchAll_pargs::write(apache::thrift::protocol::TProtocol* o return xfer; } -uint32_t ThriftHive_fetchAll_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchAll_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { this->success.clear(); uint32_t _size12; - apache::thrift::protocol::TType _etype15; + ::apache::thrift::protocol::TType _etype15; iprot->readListBegin(_etype15, _size12); this->success.resize(_size12); uint32_t _i16; @@ -628,7 +628,7 @@ uint32_t ThriftHive_fetchAll_result::read(apache::thrift::protocol::TProtocol* i } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -647,16 +647,16 @@ uint32_t ThriftHive_fetchAll_result::read(apache::thrift::protocol::TProtocol* i return xfer; } -uint32_t ThriftHive_fetchAll_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_fetchAll_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_fetchAll_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_LIST, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); { - xfer += oprot->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, this->success.size()); std::vector ::const_iterator _iter17; for (_iter17 = this->success.begin(); _iter17 != this->success.end(); ++_iter17) { @@ -666,7 +666,7 @@ uint32_t ThriftHive_fetchAll_result::write(apache::thrift::protocol::TProtocol* } xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -675,32 +675,32 @@ uint32_t ThriftHive_fetchAll_result::write(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_fetchAll_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_fetchAll_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_LIST) { + if (ftype == ::apache::thrift::protocol::T_LIST) { { (*(this->success)).clear(); uint32_t _size18; - apache::thrift::protocol::TType _etype21; + ::apache::thrift::protocol::TType _etype21; iprot->readListBegin(_etype21, _size18); (*(this->success)).resize(_size18); uint32_t _i22; @@ -716,7 +716,7 @@ uint32_t ThriftHive_fetchAll_presult::read(apache::thrift::protocol::TProtocol* } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -735,22 +735,22 @@ uint32_t ThriftHive_fetchAll_presult::read(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_getSchema_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getSchema_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -767,7 +767,7 @@ uint32_t ThriftHive_getSchema_args::read(apache::thrift::protocol::TProtocol* ip return xfer; } -uint32_t ThriftHive_getSchema_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_args"); xfer += oprot->writeFieldStop(); @@ -775,7 +775,7 @@ uint32_t ThriftHive_getSchema_args::write(apache::thrift::protocol::TProtocol* o return xfer; } -uint32_t ThriftHive_getSchema_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_pargs"); xfer += oprot->writeFieldStop(); @@ -783,28 +783,28 @@ uint32_t ThriftHive_getSchema_pargs::write(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_getSchema_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getSchema_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -812,7 +812,7 @@ uint32_t ThriftHive_getSchema_result::read(apache::thrift::protocol::TProtocol* } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -831,18 +831,18 @@ uint32_t ThriftHive_getSchema_result::read(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_getSchema_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getSchema_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getSchema_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -851,28 +851,28 @@ uint32_t ThriftHive_getSchema_result::write(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_getSchema_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getSchema_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -880,7 +880,7 @@ uint32_t ThriftHive_getSchema_presult::read(apache::thrift::protocol::TProtocol* } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -899,22 +899,22 @@ uint32_t ThriftHive_getSchema_presult::read(apache::thrift::protocol::TProtocol* return xfer; } -uint32_t ThriftHive_getThriftSchema_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getThriftSchema_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -931,7 +931,7 @@ uint32_t ThriftHive_getThriftSchema_args::read(apache::thrift::protocol::TProtoc return xfer; } -uint32_t ThriftHive_getThriftSchema_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getThriftSchema_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_args"); xfer += oprot->writeFieldStop(); @@ -939,7 +939,7 @@ uint32_t ThriftHive_getThriftSchema_args::write(apache::thrift::protocol::TProto return xfer; } -uint32_t ThriftHive_getThriftSchema_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getThriftSchema_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_pargs"); xfer += oprot->writeFieldStop(); @@ -947,28 +947,28 @@ uint32_t ThriftHive_getThriftSchema_pargs::write(apache::thrift::protocol::TProt return xfer; } -uint32_t ThriftHive_getThriftSchema_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getThriftSchema_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -976,7 +976,7 @@ uint32_t ThriftHive_getThriftSchema_result::read(apache::thrift::protocol::TProt } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -995,18 +995,18 @@ uint32_t ThriftHive_getThriftSchema_result::read(apache::thrift::protocol::TProt return xfer; } -uint32_t ThriftHive_getThriftSchema_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getThriftSchema_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1015,28 +1015,28 @@ uint32_t ThriftHive_getThriftSchema_result::write(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHive_getThriftSchema_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getThriftSchema_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -1044,7 +1044,7 @@ uint32_t ThriftHive_getThriftSchema_presult::read(apache::thrift::protocol::TPro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -1063,22 +1063,22 @@ uint32_t ThriftHive_getThriftSchema_presult::read(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHive_getClusterStatus_args::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getClusterStatus_args::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) @@ -1095,7 +1095,7 @@ uint32_t ThriftHive_getClusterStatus_args::read(apache::thrift::protocol::TProto return xfer; } -uint32_t ThriftHive_getClusterStatus_args::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getClusterStatus_args::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_args"); xfer += oprot->writeFieldStop(); @@ -1103,7 +1103,7 @@ uint32_t ThriftHive_getClusterStatus_args::write(apache::thrift::protocol::TProt return xfer; } -uint32_t ThriftHive_getClusterStatus_pargs::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getClusterStatus_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_pargs"); xfer += oprot->writeFieldStop(); @@ -1111,28 +1111,28 @@ uint32_t ThriftHive_getClusterStatus_pargs::write(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHive_getClusterStatus_result::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getClusterStatus_result::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->success.read(iprot); this->__isset.success = true; } else { @@ -1140,7 +1140,7 @@ uint32_t ThriftHive_getClusterStatus_result::read(apache::thrift::protocol::TPro } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -1159,18 +1159,18 @@ uint32_t ThriftHive_getClusterStatus_result::read(apache::thrift::protocol::TPro return xfer; } -uint32_t ThriftHive_getClusterStatus_result::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t ThriftHive_getClusterStatus_result::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_result"); if (this->__isset.success) { - xfer += oprot->writeFieldBegin("success", apache::thrift::protocol::T_STRUCT, 0); + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); xfer += this->success.write(oprot); xfer += oprot->writeFieldEnd(); } else if (this->__isset.ex) { - xfer += oprot->writeFieldBegin("ex", apache::thrift::protocol::T_STRUCT, 1); + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); xfer += this->ex.write(oprot); xfer += oprot->writeFieldEnd(); } @@ -1179,28 +1179,28 @@ uint32_t ThriftHive_getClusterStatus_result::write(apache::thrift::protocol::TPr return xfer; } -uint32_t ThriftHive_getClusterStatus_presult::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t ThriftHive_getClusterStatus_presult::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 0: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += (*(this->success)).read(iprot); this->__isset.success = true; } else { @@ -1208,7 +1208,171 @@ uint32_t ThriftHive_getClusterStatus_presult::read(apache::thrift::protocol::TPr } break; case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_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) + { + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_args"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_pargs"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_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_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ex.read(iprot); + this->__isset.ex = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("ThriftHive_getQueryPlan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ex) { + xfer += oprot->writeFieldBegin("ex", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->ex.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t ThriftHive_getQueryPlan_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_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { xfer += this->ex.read(iprot); this->__isset.ex = true; } else { @@ -1236,7 +1400,7 @@ void ThriftHiveClient::execute(const std::string& query) void ThriftHiveClient::send_execute(const std::string& query) { int32_t cseqid = 0; - oprot_->writeMessageBegin("execute", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("execute", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_execute_pargs args; args.query = &query; @@ -1252,27 +1416,27 @@ void ThriftHiveClient::recv_execute() int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("execute") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_execute_presult result; result.read(iprot_); @@ -1294,7 +1458,7 @@ void ThriftHiveClient::fetchOne(std::string& _return) void ThriftHiveClient::send_fetchOne() { int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchOne", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_fetchOne_pargs args; args.write(oprot_); @@ -1309,27 +1473,27 @@ void ThriftHiveClient::recv_fetchOne(std::string& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("fetchOne") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_fetchOne_presult result; result.success = &_return; @@ -1344,7 +1508,7 @@ void ThriftHiveClient::recv_fetchOne(std::string& _return) if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "fetchOne failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchOne failed: unknown result"); } void ThriftHiveClient::fetchN(std::vector & _return, const int32_t numRows) @@ -1356,7 +1520,7 @@ void ThriftHiveClient::fetchN(std::vector & _return, const int32_t void ThriftHiveClient::send_fetchN(const int32_t numRows) { int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchN", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_fetchN_pargs args; args.numRows = &numRows; @@ -1372,27 +1536,27 @@ void ThriftHiveClient::recv_fetchN(std::vector & _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("fetchN") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_fetchN_presult result; result.success = &_return; @@ -1407,7 +1571,7 @@ void ThriftHiveClient::recv_fetchN(std::vector & _return) if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "fetchN failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchN failed: unknown result"); } void ThriftHiveClient::fetchAll(std::vector & _return) @@ -1419,7 +1583,7 @@ void ThriftHiveClient::fetchAll(std::vector & _return) void ThriftHiveClient::send_fetchAll() { int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchAll", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_fetchAll_pargs args; args.write(oprot_); @@ -1434,27 +1598,27 @@ void ThriftHiveClient::recv_fetchAll(std::vector & _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("fetchAll") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_fetchAll_presult result; result.success = &_return; @@ -1469,7 +1633,7 @@ void ThriftHiveClient::recv_fetchAll(std::vector & _return) if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "fetchAll failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "fetchAll failed: unknown result"); } void ThriftHiveClient::getSchema(Apache::Hadoop::Hive::Schema& _return) @@ -1481,7 +1645,7 @@ void ThriftHiveClient::getSchema(Apache::Hadoop::Hive::Schema& _return) void ThriftHiveClient::send_getSchema() { int32_t cseqid = 0; - oprot_->writeMessageBegin("getSchema", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_getSchema_pargs args; args.write(oprot_); @@ -1496,27 +1660,27 @@ void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("getSchema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_getSchema_presult result; result.success = &_return; @@ -1531,7 +1695,7 @@ void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _return) if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getSchema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getSchema failed: unknown result"); } void ThriftHiveClient::getThriftSchema(Apache::Hadoop::Hive::Schema& _return) @@ -1543,7 +1707,7 @@ void ThriftHiveClient::getThriftSchema(Apache::Hadoop::Hive::Schema& _return) void ThriftHiveClient::send_getThriftSchema() { int32_t cseqid = 0; - oprot_->writeMessageBegin("getThriftSchema", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_getThriftSchema_pargs args; args.write(oprot_); @@ -1558,27 +1722,27 @@ void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _retur int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("getThriftSchema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_getThriftSchema_presult result; result.success = &_return; @@ -1593,7 +1757,7 @@ void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _retur if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getThriftSchema failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getThriftSchema failed: unknown result"); } void ThriftHiveClient::getClusterStatus(HiveClusterStatus& _return) @@ -1605,7 +1769,7 @@ void ThriftHiveClient::getClusterStatus(HiveClusterStatus& _return) void ThriftHiveClient::send_getClusterStatus() { int32_t cseqid = 0; - oprot_->writeMessageBegin("getClusterStatus", apache::thrift::protocol::T_CALL, cseqid); + oprot_->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_CALL, cseqid); ThriftHive_getClusterStatus_pargs args; args.write(oprot_); @@ -1620,27 +1784,27 @@ void ThriftHiveClient::recv_getClusterStatus(HiveClusterStatus& _return) int32_t rseqid = 0; std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; + 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); + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); } if (fname.compare("getClusterStatus") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); + iprot_->skip(::apache::thrift::protocol::T_STRUCT); iprot_->readMessageEnd(); iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); } ThriftHive_getClusterStatus_presult result; result.success = &_return; @@ -1655,25 +1819,87 @@ void ThriftHiveClient::recv_getClusterStatus(HiveClusterStatus& _return) if (result.__isset.ex) { throw result.ex; } - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::MISSING_RESULT, "getClusterStatus failed: unknown result"); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getClusterStatus failed: unknown result"); +} + +void ThriftHiveClient::getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) +{ + send_getQueryPlan(); + recv_getQueryPlan(_return); +} + +void ThriftHiveClient::send_getQueryPlan() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_CALL, cseqid); + + ThriftHive_getQueryPlan_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->flush(); + oprot_->getTransport()->writeEnd(); +} + +void ThriftHiveClient::recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _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(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + } + if (fname.compare("getQueryPlan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::WRONG_METHOD_NAME); + } + ThriftHive_getQueryPlan_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.ex) { + throw result.ex; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getQueryPlan failed: unknown result"); } -bool ThriftHiveProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot) { +bool ThriftHiveProcessor::process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot) { - apache::thrift::protocol::TProtocol* iprot = piprot.get(); - apache::thrift::protocol::TProtocol* oprot = poprot.get(); + ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); + ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); std::string fname; - apache::thrift::protocol::TMessageType mtype; + ::apache::thrift::protocol::TMessageType mtype; int32_t seqid; iprot->readMessageBegin(fname, mtype, seqid); - if (mtype != apache::thrift::protocol::T_CALL && mtype != apache::thrift::protocol::T_ONEWAY) { - iprot->skip(apache::thrift::protocol::T_STRUCT); + if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); iprot->readMessageEnd(); iprot->getTransport()->readEnd(); - apache::thrift::TApplicationException x(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - oprot->writeMessageBegin(fname, apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1684,8 +1910,8 @@ bool ThriftHiveProcessor::process(boost::shared_ptr::iterator pfn; +bool ThriftHiveProcessor::process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid) { + std::map::iterator pfn; pfn = processMap_.find(fname); if (pfn == processMap_.end()) { return Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor::process_fn(iprot, oprot, fname, seqid); @@ -1694,7 +1920,7 @@ bool ThriftHiveProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, return true; } -void ThriftHiveProcessor::process_execute(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_execute_args args; args.read(iprot); @@ -1708,8 +1934,8 @@ void ThriftHiveProcessor::process_execute(int32_t seqid, apache::thrift::protoco result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("execute", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1717,14 +1943,14 @@ void ThriftHiveProcessor::process_execute(int32_t seqid, apache::thrift::protoco return; } - oprot->writeMessageBegin("execute", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("execute", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_fetchOne(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_fetchOne_args args; args.read(iprot); @@ -1739,8 +1965,8 @@ void ThriftHiveProcessor::process_fetchOne(int32_t seqid, apache::thrift::protoc result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("fetchOne", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1748,14 +1974,14 @@ void ThriftHiveProcessor::process_fetchOne(int32_t seqid, apache::thrift::protoc return; } - oprot->writeMessageBegin("fetchOne", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("fetchOne", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_fetchN(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_fetchN_args args; args.read(iprot); @@ -1770,8 +1996,8 @@ void ThriftHiveProcessor::process_fetchN(int32_t seqid, apache::thrift::protocol result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("fetchN", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1779,14 +2005,14 @@ void ThriftHiveProcessor::process_fetchN(int32_t seqid, apache::thrift::protocol return; } - oprot->writeMessageBegin("fetchN", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("fetchN", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_fetchAll(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_fetchAll_args args; args.read(iprot); @@ -1801,8 +2027,8 @@ void ThriftHiveProcessor::process_fetchAll(int32_t seqid, apache::thrift::protoc result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("fetchAll", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1810,14 +2036,14 @@ void ThriftHiveProcessor::process_fetchAll(int32_t seqid, apache::thrift::protoc return; } - oprot->writeMessageBegin("fetchAll", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("fetchAll", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_getSchema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_getSchema_args args; args.read(iprot); @@ -1832,8 +2058,8 @@ void ThriftHiveProcessor::process_getSchema(int32_t seqid, apache::thrift::proto result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getSchema", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1841,14 +2067,14 @@ void ThriftHiveProcessor::process_getSchema(int32_t seqid, apache::thrift::proto return; } - oprot->writeMessageBegin("getSchema", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("getSchema", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_getThriftSchema_args args; args.read(iprot); @@ -1863,8 +2089,8 @@ void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, apache::thrift: result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getThriftSchema", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1872,14 +2098,14 @@ void ThriftHiveProcessor::process_getThriftSchema(int32_t seqid, apache::thrift: return; } - oprot->writeMessageBegin("getThriftSchema", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("getThriftSchema", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); oprot->getTransport()->writeEnd(); } -void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) +void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) { ThriftHive_getClusterStatus_args args; args.read(iprot); @@ -1894,8 +2120,39 @@ void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, apache::thrift result.ex = ex; result.__isset.ex = true; } catch (const std::exception& e) { - apache::thrift::TApplicationException x(e.what()); - oprot->writeMessageBegin("getClusterStatus", apache::thrift::protocol::T_EXCEPTION, seqid); + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); + return; + } + + oprot->writeMessageBegin("getClusterStatus", ::apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->flush(); + oprot->getTransport()->writeEnd(); +} + +void ThriftHiveProcessor::process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot) +{ + ThriftHive_getQueryPlan_args args; + args.read(iprot); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + + ThriftHive_getQueryPlan_result result; + try { + iface_->getQueryPlan(result.success); + result.__isset.success = true; + } catch (HiveServerException &ex) { + result.ex = ex; + result.__isset.ex = true; + } catch (const std::exception& e) { + ::apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_EXCEPTION, seqid); x.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); @@ -1903,7 +2160,7 @@ void ThriftHiveProcessor::process_getClusterStatus(int32_t seqid, apache::thrift return; } - oprot->writeMessageBegin("getClusterStatus", apache::thrift::protocol::T_REPLY, seqid); + oprot->writeMessageBegin("getQueryPlan", ::apache::thrift::protocol::T_REPLY, seqid); result.write(oprot); oprot->writeMessageEnd(); oprot->getTransport()->flush(); diff --git service/src/gen-cpp/ThriftHive.h service/src/gen-cpp/ThriftHive.h index d2706a2..70b12d8 100644 --- service/src/gen-cpp/ThriftHive.h +++ service/src/gen-cpp/ThriftHive.h @@ -22,6 +22,7 @@ class ThriftHiveIf : virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreIf virtual void getSchema(Apache::Hadoop::Hive::Schema& _return) = 0; virtual void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) = 0; virtual void getClusterStatus(HiveClusterStatus& _return) = 0; + virtual void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) = 0; }; class ThriftHiveNull : virtual public ThriftHiveIf , virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreNull { @@ -48,8 +49,16 @@ class ThriftHiveNull : virtual public ThriftHiveIf , virtual public Apache::Hado void getClusterStatus(HiveClusterStatus& /* _return */) { return; } + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& /* _return */) { + return; + } }; +typedef struct _ThriftHive_execute_args__isset { + _ThriftHive_execute_args__isset() : query(false) {} + bool query; +} _ThriftHive_execute_args__isset; + class ThriftHive_execute_args { public: @@ -60,10 +69,7 @@ class ThriftHive_execute_args { std::string query; - struct __isset { - __isset() : query(false) {} - bool query; - } __isset; + _ThriftHive_execute_args__isset __isset; bool operator == (const ThriftHive_execute_args & rhs) const { @@ -77,11 +83,12 @@ class ThriftHive_execute_args { bool operator < (const ThriftHive_execute_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_execute_pargs { public: @@ -90,10 +97,15 @@ class ThriftHive_execute_pargs { const std::string* query; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_execute_result__isset { + _ThriftHive_execute_result__isset() : ex(false) {} + bool ex; +} _ThriftHive_execute_result__isset; + class ThriftHive_execute_result { public: @@ -104,10 +116,7 @@ class ThriftHive_execute_result { HiveServerException ex; - struct __isset { - __isset() : ex(false) {} - bool ex; - } __isset; + _ThriftHive_execute_result__isset __isset; bool operator == (const ThriftHive_execute_result & rhs) const { @@ -121,11 +130,16 @@ class ThriftHive_execute_result { bool operator < (const ThriftHive_execute_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_execute_presult__isset { + _ThriftHive_execute_presult__isset() : ex(false) {} + bool ex; +} _ThriftHive_execute_presult__isset; + class ThriftHive_execute_presult { public: @@ -134,15 +148,13 @@ class ThriftHive_execute_presult { HiveServerException ex; - struct __isset { - __isset() : ex(false) {} - bool ex; - } __isset; + _ThriftHive_execute_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHive_fetchOne_args { public: @@ -162,11 +174,12 @@ class ThriftHive_fetchOne_args { bool operator < (const ThriftHive_fetchOne_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_fetchOne_pargs { public: @@ -174,10 +187,16 @@ class ThriftHive_fetchOne_pargs { virtual ~ThriftHive_fetchOne_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchOne_result__isset { + _ThriftHive_fetchOne_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchOne_result__isset; + class ThriftHive_fetchOne_result { public: @@ -189,11 +208,7 @@ class ThriftHive_fetchOne_result { std::string success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchOne_result__isset __isset; bool operator == (const ThriftHive_fetchOne_result & rhs) const { @@ -209,11 +224,17 @@ class ThriftHive_fetchOne_result { bool operator < (const ThriftHive_fetchOne_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchOne_presult__isset { + _ThriftHive_fetchOne_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchOne_presult__isset; + class ThriftHive_fetchOne_presult { public: @@ -223,16 +244,17 @@ class ThriftHive_fetchOne_presult { std::string* success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchOne_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; +typedef struct _ThriftHive_fetchN_args__isset { + _ThriftHive_fetchN_args__isset() : numRows(false) {} + bool numRows; +} _ThriftHive_fetchN_args__isset; + class ThriftHive_fetchN_args { public: @@ -243,10 +265,7 @@ class ThriftHive_fetchN_args { int32_t numRows; - struct __isset { - __isset() : numRows(false) {} - bool numRows; - } __isset; + _ThriftHive_fetchN_args__isset __isset; bool operator == (const ThriftHive_fetchN_args & rhs) const { @@ -260,11 +279,12 @@ class ThriftHive_fetchN_args { bool operator < (const ThriftHive_fetchN_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_fetchN_pargs { public: @@ -273,10 +293,16 @@ class ThriftHive_fetchN_pargs { const int32_t* numRows; - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchN_result__isset { + _ThriftHive_fetchN_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchN_result__isset; + class ThriftHive_fetchN_result { public: @@ -288,11 +314,7 @@ class ThriftHive_fetchN_result { std::vector success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchN_result__isset __isset; bool operator == (const ThriftHive_fetchN_result & rhs) const { @@ -308,11 +330,17 @@ class ThriftHive_fetchN_result { bool operator < (const ThriftHive_fetchN_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchN_presult__isset { + _ThriftHive_fetchN_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchN_presult__isset; + class ThriftHive_fetchN_presult { public: @@ -322,16 +350,13 @@ class ThriftHive_fetchN_presult { std::vector * success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchN_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHive_fetchAll_args { public: @@ -351,11 +376,12 @@ class ThriftHive_fetchAll_args { bool operator < (const ThriftHive_fetchAll_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_fetchAll_pargs { public: @@ -363,10 +389,16 @@ class ThriftHive_fetchAll_pargs { virtual ~ThriftHive_fetchAll_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchAll_result__isset { + _ThriftHive_fetchAll_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchAll_result__isset; + class ThriftHive_fetchAll_result { public: @@ -378,11 +410,7 @@ class ThriftHive_fetchAll_result { std::vector success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchAll_result__isset __isset; bool operator == (const ThriftHive_fetchAll_result & rhs) const { @@ -398,11 +426,17 @@ class ThriftHive_fetchAll_result { bool operator < (const ThriftHive_fetchAll_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_fetchAll_presult__isset { + _ThriftHive_fetchAll_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_fetchAll_presult__isset; + class ThriftHive_fetchAll_presult { public: @@ -412,16 +446,13 @@ class ThriftHive_fetchAll_presult { std::vector * success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_fetchAll_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHive_getSchema_args { public: @@ -441,11 +472,12 @@ class ThriftHive_getSchema_args { bool operator < (const ThriftHive_getSchema_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_getSchema_pargs { public: @@ -453,10 +485,16 @@ class ThriftHive_getSchema_pargs { virtual ~ThriftHive_getSchema_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getSchema_result__isset { + _ThriftHive_getSchema_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getSchema_result__isset; + class ThriftHive_getSchema_result { public: @@ -468,11 +506,7 @@ class ThriftHive_getSchema_result { Apache::Hadoop::Hive::Schema success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getSchema_result__isset __isset; bool operator == (const ThriftHive_getSchema_result & rhs) const { @@ -488,11 +522,17 @@ class ThriftHive_getSchema_result { bool operator < (const ThriftHive_getSchema_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getSchema_presult__isset { + _ThriftHive_getSchema_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getSchema_presult__isset; + class ThriftHive_getSchema_presult { public: @@ -502,16 +542,13 @@ class ThriftHive_getSchema_presult { Apache::Hadoop::Hive::Schema* success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getSchema_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHive_getThriftSchema_args { public: @@ -531,11 +568,12 @@ class ThriftHive_getThriftSchema_args { bool operator < (const ThriftHive_getThriftSchema_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_getThriftSchema_pargs { public: @@ -543,10 +581,16 @@ class ThriftHive_getThriftSchema_pargs { virtual ~ThriftHive_getThriftSchema_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getThriftSchema_result__isset { + _ThriftHive_getThriftSchema_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getThriftSchema_result__isset; + class ThriftHive_getThriftSchema_result { public: @@ -558,11 +602,7 @@ class ThriftHive_getThriftSchema_result { Apache::Hadoop::Hive::Schema success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getThriftSchema_result__isset __isset; bool operator == (const ThriftHive_getThriftSchema_result & rhs) const { @@ -578,11 +618,17 @@ class ThriftHive_getThriftSchema_result { bool operator < (const ThriftHive_getThriftSchema_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getThriftSchema_presult__isset { + _ThriftHive_getThriftSchema_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getThriftSchema_presult__isset; + class ThriftHive_getThriftSchema_presult { public: @@ -592,16 +638,13 @@ class ThriftHive_getThriftSchema_presult { Apache::Hadoop::Hive::Schema* success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getThriftSchema_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; + class ThriftHive_getClusterStatus_args { public: @@ -621,11 +664,12 @@ class ThriftHive_getClusterStatus_args { bool operator < (const ThriftHive_getClusterStatus_args & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; + class ThriftHive_getClusterStatus_pargs { public: @@ -633,10 +677,16 @@ class ThriftHive_getClusterStatus_pargs { virtual ~ThriftHive_getClusterStatus_pargs() throw() {} - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getClusterStatus_result__isset { + _ThriftHive_getClusterStatus_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getClusterStatus_result__isset; + class ThriftHive_getClusterStatus_result { public: @@ -648,11 +698,7 @@ class ThriftHive_getClusterStatus_result { HiveClusterStatus success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getClusterStatus_result__isset __isset; bool operator == (const ThriftHive_getClusterStatus_result & rhs) const { @@ -668,11 +714,17 @@ class ThriftHive_getClusterStatus_result { bool operator < (const ThriftHive_getClusterStatus_result & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; +typedef struct _ThriftHive_getClusterStatus_presult__isset { + _ThriftHive_getClusterStatus_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getClusterStatus_presult__isset; + class ThriftHive_getClusterStatus_presult { public: @@ -682,26 +734,118 @@ class ThriftHive_getClusterStatus_presult { HiveClusterStatus* success; HiveServerException ex; - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; + _ThriftHive_getClusterStatus_presult__isset __isset; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class ThriftHive_getQueryPlan_args { + public: + + ThriftHive_getQueryPlan_args() { + } + + virtual ~ThriftHive_getQueryPlan_args() throw() {} + + + bool operator == (const ThriftHive_getQueryPlan_args & /* rhs */) const + { + return true; + } + bool operator != (const ThriftHive_getQueryPlan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHive_getQueryPlan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class ThriftHive_getQueryPlan_pargs { + public: + + + virtual ~ThriftHive_getQueryPlan_pargs() throw() {} + + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHive_getQueryPlan_result__isset { + _ThriftHive_getQueryPlan_result__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getQueryPlan_result__isset; + +class ThriftHive_getQueryPlan_result { + public: + + ThriftHive_getQueryPlan_result() { + } + + virtual ~ThriftHive_getQueryPlan_result() throw() {} + + Apache::Hadoop::Hive::QueryPlan success; + HiveServerException ex; + + _ThriftHive_getQueryPlan_result__isset __isset; + + bool operator == (const ThriftHive_getQueryPlan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(ex == rhs.ex)) + return false; + return true; + } + bool operator != (const ThriftHive_getQueryPlan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ThriftHive_getQueryPlan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ThriftHive_getQueryPlan_presult__isset { + _ThriftHive_getQueryPlan_presult__isset() : success(false), ex(false) {} + bool success; + bool ex; +} _ThriftHive_getQueryPlan_presult__isset; + +class ThriftHive_getQueryPlan_presult { + public: + + + virtual ~ThriftHive_getQueryPlan_presult() throw() {} + + Apache::Hadoop::Hive::QueryPlan* success; + HiveServerException ex; + + _ThriftHive_getQueryPlan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); }; class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreClient { public: - ThriftHiveClient(boost::shared_ptr prot) : + ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} - ThriftHiveClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : + ThriftHiveClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} - boost::shared_ptr getInputProtocol() { + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { return piprot_; } - boost::shared_ptr getOutputProtocol() { + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { return poprot_; } void execute(const std::string& query); @@ -725,21 +869,25 @@ class ThriftHiveClient : virtual public ThriftHiveIf, public Apache::Hadoop::Hiv void getClusterStatus(HiveClusterStatus& _return); void send_getClusterStatus(); void recv_getClusterStatus(HiveClusterStatus& _return); + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); + void send_getQueryPlan(); + void recv_getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return); }; -class ThriftHiveProcessor : virtual public apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { +class ThriftHiveProcessor : virtual public ::apache::thrift::TProcessor, public Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor { protected: boost::shared_ptr iface_; - virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); + virtual bool process_fn(::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid); private: - std::map processMap_; - void process_execute(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_fetchOne(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_fetchN(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_fetchAll(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getSchema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getThriftSchema(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); - void process_getClusterStatus(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot); + std::map processMap_; + void process_execute(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_fetchOne(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_fetchN(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_fetchAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_getSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_getThriftSchema(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_getClusterStatus(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); + void process_getQueryPlan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot); public: ThriftHiveProcessor(boost::shared_ptr iface) : Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), @@ -751,9 +899,10 @@ class ThriftHiveProcessor : virtual public apache::thrift::TProcessor, public Ap processMap_["getSchema"] = &ThriftHiveProcessor::process_getSchema; processMap_["getThriftSchema"] = &ThriftHiveProcessor::process_getThriftSchema; processMap_["getClusterStatus"] = &ThriftHiveProcessor::process_getClusterStatus; + processMap_["getQueryPlan"] = &ThriftHiveProcessor::process_getQueryPlan; } - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); + virtual bool process(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot); virtual ~ThriftHiveProcessor() {} }; @@ -853,6 +1002,18 @@ class ThriftHiveMultiface : virtual public ThriftHiveIf, public Apache::Hadoop:: } } + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + uint32_t sz = ifaces_.size(); + for (uint32_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getQueryPlan(_return); + return; + } else { + ifaces_[i]->getQueryPlan(_return); + } + } + } + }; }}} // namespace diff --git service/src/gen-cpp/ThriftHive_server.skeleton.cpp service/src/gen-cpp/ThriftHive_server.skeleton.cpp index 39c28e7..7651d92 100644 --- service/src/gen-cpp/ThriftHive_server.skeleton.cpp +++ service/src/gen-cpp/ThriftHive_server.skeleton.cpp @@ -7,10 +7,10 @@ #include #include -using namespace apache::thrift; -using namespace apache::thrift::protocol; -using namespace apache::thrift::transport; -using namespace apache::thrift::server; +using namespace ::apache::thrift; +using namespace ::apache::thrift::protocol; +using namespace ::apache::thrift::transport; +using namespace ::apache::thrift::server; using boost::shared_ptr; @@ -57,6 +57,11 @@ class ThriftHiveHandler : virtual public ThriftHiveIf { printf("getClusterStatus\n"); } + void getQueryPlan(Apache::Hadoop::Hive::QueryPlan& _return) { + // Your implementation goes here + printf("getQueryPlan\n"); + } + }; int main(int argc, char **argv) { diff --git service/src/gen-cpp/hive_service_types.cpp service/src/gen-cpp/hive_service_types.cpp index 5e9a9b9..321f424 100644 --- service/src/gen-cpp/hive_service_types.cpp +++ service/src/gen-cpp/hive_service_types.cpp @@ -10,28 +10,28 @@ namespace Apache { namespace Hadoop { namespace Hive { const char* HiveClusterStatus::ascii_fingerprint = "D514EDCFFC86F64A2E924DCD16D4FAD8"; const uint8_t HiveClusterStatus::binary_fingerprint[16] = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8}; -uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t HiveClusterStatus::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->taskTrackers); this->__isset.taskTrackers = true; } else { @@ -39,7 +39,7 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 2: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->mapTasks); this->__isset.mapTasks = true; } else { @@ -47,7 +47,7 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 3: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->reduceTasks); this->__isset.reduceTasks = true; } else { @@ -55,7 +55,7 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 4: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->maxMapTasks); this->__isset.maxMapTasks = true; } else { @@ -63,7 +63,7 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 5: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { xfer += iprot->readI32(this->maxReduceTasks); this->__isset.maxReduceTasks = true; } else { @@ -71,10 +71,10 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { } break; case 6: - if (ftype == apache::thrift::protocol::T_I32) { + if (ftype == ::apache::thrift::protocol::T_I32) { int32_t ecast0; xfer += iprot->readI32(ecast0); - this->state = (JobTrackerState)ecast0; + this->state = (JobTrackerState::type)ecast0; this->__isset.state = true; } else { xfer += iprot->skip(ftype); @@ -92,25 +92,25 @@ uint32_t HiveClusterStatus::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t HiveClusterStatus::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t HiveClusterStatus::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveClusterStatus"); - xfer += oprot->writeFieldBegin("taskTrackers", apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeFieldBegin("taskTrackers", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->taskTrackers); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("mapTasks", apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeFieldBegin("mapTasks", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->mapTasks); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("reduceTasks", apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeFieldBegin("reduceTasks", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->reduceTasks); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("maxMapTasks", apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeFieldBegin("maxMapTasks", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->maxMapTasks); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("maxReduceTasks", apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeFieldBegin("maxReduceTasks", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->maxReduceTasks); xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("state", apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeFieldBegin("state", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32((int32_t)this->state); xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); @@ -118,37 +118,53 @@ uint32_t HiveClusterStatus::write(apache::thrift::protocol::TProtocol* oprot) co return xfer; } -const char* HiveServerException::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; -const uint8_t HiveServerException::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; +const char* HiveServerException::ascii_fingerprint = "70563A0628F75DF9555F4D24690B1E26"; +const uint8_t HiveServerException::binary_fingerprint[16] = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; -uint32_t HiveServerException::read(apache::thrift::protocol::TProtocol* iprot) { +uint32_t HiveServerException::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t xfer = 0; std::string fname; - apache::thrift::protocol::TType ftype; + ::apache::thrift::protocol::TType ftype; int16_t fid; xfer += iprot->readStructBegin(fname); - using apache::thrift::protocol::TProtocolException; + using ::apache::thrift::protocol::TProtocolException; while (true) { xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { + if (ftype == ::apache::thrift::protocol::T_STOP) { break; } switch (fid) { case 1: - if (ftype == apache::thrift::protocol::T_STRING) { + if (ftype == ::apache::thrift::protocol::T_STRING) { xfer += iprot->readString(this->message); this->__isset.message = true; } else { xfer += iprot->skip(ftype); } break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->errorCode); + this->__isset.errorCode = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->SQLState); + this->__isset.SQLState = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -161,12 +177,18 @@ uint32_t HiveServerException::read(apache::thrift::protocol::TProtocol* iprot) { return xfer; } -uint32_t HiveServerException::write(apache::thrift::protocol::TProtocol* oprot) const { +uint32_t HiveServerException::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; xfer += oprot->writeStructBegin("HiveServerException"); - xfer += oprot->writeFieldBegin("message", apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->message); xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("errorCode", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->errorCode); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("SQLState", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->SQLState); + xfer += oprot->writeFieldEnd(); xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; diff --git service/src/gen-cpp/hive_service_types.h service/src/gen-cpp/hive_service_types.h index 930b0ec..61dfb20 100644 --- service/src/gen-cpp/hive_service_types.h +++ service/src/gen-cpp/hive_service_types.h @@ -7,20 +7,34 @@ #define hive_service_TYPES_H #include +#include #include #include #include "fb303_types.h" #include "hive_metastore_types.h" +#include "queryplan_types.h" namespace Apache { namespace Hadoop { namespace Hive { -enum JobTrackerState { - INITIALIZING = 1, - RUNNING = 2 +struct JobTrackerState { + enum type { + INITIALIZING = 1, + RUNNING = 2 + }; }; +typedef struct _HiveClusterStatus__isset { + _HiveClusterStatus__isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {} + bool taskTrackers; + bool mapTasks; + bool reduceTasks; + bool maxMapTasks; + bool maxReduceTasks; + bool state; +} _HiveClusterStatus__isset; + class HiveClusterStatus { public: @@ -37,17 +51,9 @@ class HiveClusterStatus { int32_t reduceTasks; int32_t maxMapTasks; int32_t maxReduceTasks; - JobTrackerState state; - - struct __isset { - __isset() : taskTrackers(false), mapTasks(false), reduceTasks(false), maxMapTasks(false), maxReduceTasks(false), state(false) {} - bool taskTrackers; - bool mapTasks; - bool reduceTasks; - bool maxMapTasks; - bool maxReduceTasks; - bool state; - } __isset; + JobTrackerState::type state; + + _HiveClusterStatus__isset __isset; bool operator == (const HiveClusterStatus & rhs) const { @@ -71,33 +77,43 @@ class HiveClusterStatus { bool operator < (const HiveClusterStatus & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; -class HiveServerException : public apache::thrift::TException { +typedef struct _HiveServerException__isset { + _HiveServerException__isset() : message(false), errorCode(false), SQLState(false) {} + bool message; + bool errorCode; + bool SQLState; +} _HiveServerException__isset; + +class HiveServerException : 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}; + static const char* ascii_fingerprint; // = "70563A0628F75DF9555F4D24690B1E26"; + static const uint8_t binary_fingerprint[16]; // = {0x70,0x56,0x3A,0x06,0x28,0xF7,0x5D,0xF9,0x55,0x5F,0x4D,0x24,0x69,0x0B,0x1E,0x26}; - HiveServerException() : message("") { + HiveServerException() : message(""), errorCode(0), SQLState("") { } virtual ~HiveServerException() throw() {} std::string message; + int32_t errorCode; + std::string SQLState; - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; + _HiveServerException__isset __isset; bool operator == (const HiveServerException & rhs) const { if (!(message == rhs.message)) return false; + if (!(errorCode == rhs.errorCode)) + return false; + if (!(SQLState == rhs.SQLState)) + return false; return true; } bool operator != (const HiveServerException &rhs) const { @@ -106,8 +122,8 @@ class HiveServerException : public apache::thrift::TException { bool operator < (const HiveServerException & ) const; - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; }; diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/Constants.java service/src/gen-javabean/org/apache/hadoop/hive/service/Constants.java deleted file mode 100644 index 7e0375a..0000000 --- service/src/gen-javabean/org/apache/hadoop/hive/service/Constants.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -package org.apache.hadoop.hive.service; - -import java.util.List; -import java.util.ArrayList; -import java.util.Map; -import java.util.HashMap; -import java.util.Set; -import java.util.HashSet; -import org.apache.thrift.*; - -public class Constants { - -} diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java service/src/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java index bf5e917..c267692 100644 --- service/src/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java +++ service/src/gen-javabean/org/apache/hadoop/hive/service/HiveClusterStatus.java @@ -9,17 +9,26 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable { +public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("HiveClusterStatus"); + private static final TField TASK_TRACKERS_FIELD_DESC = new TField("taskTrackers", TType.I32, (short)1); private static final TField MAP_TASKS_FIELD_DESC = new TField("mapTasks", TType.I32, (short)2); private static final TField REDUCE_TASKS_FIELD_DESC = new TField("reduceTasks", TType.I32, (short)3); @@ -28,44 +37,113 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable private static final TField STATE_FIELD_DESC = new TField("state", TType.I32, (short)6); private int taskTrackers; - public static final int TASKTRACKERS = 1; private int mapTasks; - public static final int MAPTASKS = 2; private int reduceTasks; - public static final int REDUCETASKS = 3; private int maxMapTasks; - public static final int MAXMAPTASKS = 4; private int maxReduceTasks; - public static final int MAXREDUCETASKS = 5; - private int state; - public static final int STATE = 6; - - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean taskTrackers = false; - public boolean mapTasks = false; - public boolean reduceTasks = false; - public boolean maxMapTasks = false; - public boolean maxReduceTasks = false; - public boolean state = false; - } - - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(TASKTRACKERS, new FieldMetaData("taskTrackers", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - put(MAPTASKS, new FieldMetaData("mapTasks", TFieldRequirementType.DEFAULT, + private JobTrackerState state; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + TASK_TRACKERS((short)1, "taskTrackers"), + MAP_TASKS((short)2, "mapTasks"), + REDUCE_TASKS((short)3, "reduceTasks"), + MAX_MAP_TASKS((short)4, "maxMapTasks"), + MAX_REDUCE_TASKS((short)5, "maxReduceTasks"), + /** + * + * @see JobTrackerState + */ + STATE((short)6, "state"); + + 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: // TASK_TRACKERS + return TASK_TRACKERS; + case 2: // MAP_TASKS + return MAP_TASKS; + case 3: // REDUCE_TASKS + return REDUCE_TASKS; + case 4: // MAX_MAP_TASKS + return MAX_MAP_TASKS; + case 5: // MAX_REDUCE_TASKS + return MAX_REDUCE_TASKS; + case 6: // STATE + return STATE; + 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 __TASKTRACKERS_ISSET_ID = 0; + private static final int __MAPTASKS_ISSET_ID = 1; + private static final int __REDUCETASKS_ISSET_ID = 2; + private static final int __MAXMAPTASKS_ISSET_ID = 3; + private static final int __MAXREDUCETASKS_ISSET_ID = 4; + private BitSet __isset_bit_vector = new BitSet(5); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TASK_TRACKERS, new FieldMetaData("taskTrackers", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(REDUCETASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAP_TASKS, new FieldMetaData("mapTasks", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(MAXMAPTASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.REDUCE_TASKS, new FieldMetaData("reduceTasks", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(MAXREDUCETASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_MAP_TASKS, new FieldMetaData("maxMapTasks", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MAX_REDUCE_TASKS, new FieldMetaData("maxReduceTasks", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - }}); - - static { + tmpMap.put(_Fields.STATE, new FieldMetaData("state", TFieldRequirementType.DEFAULT, + new EnumMetaData(TType.ENUM, JobTrackerState.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(HiveClusterStatus.class, metaDataMap); } @@ -78,62 +156,77 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable int reduceTasks, int maxMapTasks, int maxReduceTasks, - int state) + JobTrackerState state) { this(); this.taskTrackers = taskTrackers; - this.__isset.taskTrackers = true; + setTaskTrackersIsSet(true); this.mapTasks = mapTasks; - this.__isset.mapTasks = true; + setMapTasksIsSet(true); this.reduceTasks = reduceTasks; - this.__isset.reduceTasks = true; + setReduceTasksIsSet(true); this.maxMapTasks = maxMapTasks; - this.__isset.maxMapTasks = true; + setMaxMapTasksIsSet(true); this.maxReduceTasks = maxReduceTasks; - this.__isset.maxReduceTasks = true; + setMaxReduceTasksIsSet(true); this.state = state; - this.__isset.state = true; } /** * Performs a deep copy on other. */ public HiveClusterStatus(HiveClusterStatus other) { - __isset.taskTrackers = other.__isset.taskTrackers; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.taskTrackers = other.taskTrackers; - __isset.mapTasks = other.__isset.mapTasks; this.mapTasks = other.mapTasks; - __isset.reduceTasks = other.__isset.reduceTasks; this.reduceTasks = other.reduceTasks; - __isset.maxMapTasks = other.__isset.maxMapTasks; this.maxMapTasks = other.maxMapTasks; - __isset.maxReduceTasks = other.__isset.maxReduceTasks; this.maxReduceTasks = other.maxReduceTasks; - __isset.state = other.__isset.state; - this.state = other.state; + if (other.isSetState()) { + this.state = other.state; + } } - @Override - public HiveClusterStatus clone() { + public HiveClusterStatus deepCopy() { return new HiveClusterStatus(this); } + @Override + public void clear() { + setTaskTrackersIsSet(false); + this.taskTrackers = 0; + setMapTasksIsSet(false); + this.mapTasks = 0; + setReduceTasksIsSet(false); + this.reduceTasks = 0; + setMaxMapTasksIsSet(false); + this.maxMapTasks = 0; + setMaxReduceTasksIsSet(false); + this.maxReduceTasks = 0; + this.state = null; + } + public int getTaskTrackers() { return this.taskTrackers; } public void setTaskTrackers(int taskTrackers) { this.taskTrackers = taskTrackers; - this.__isset.taskTrackers = true; + setTaskTrackersIsSet(true); } public void unsetTaskTrackers() { - this.__isset.taskTrackers = false; + __isset_bit_vector.clear(__TASKTRACKERS_ISSET_ID); } - // Returns true if field taskTrackers is set (has been asigned a value) and false otherwise + /** Returns true if field taskTrackers is set (has been asigned a value) and false otherwise */ public boolean isSetTaskTrackers() { - return this.__isset.taskTrackers; + return __isset_bit_vector.get(__TASKTRACKERS_ISSET_ID); + } + + public void setTaskTrackersIsSet(boolean value) { + __isset_bit_vector.set(__TASKTRACKERS_ISSET_ID, value); } public int getMapTasks() { @@ -142,16 +235,20 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable public void setMapTasks(int mapTasks) { this.mapTasks = mapTasks; - this.__isset.mapTasks = true; + setMapTasksIsSet(true); } public void unsetMapTasks() { - this.__isset.mapTasks = false; + __isset_bit_vector.clear(__MAPTASKS_ISSET_ID); } - // Returns true if field mapTasks is set (has been asigned a value) and false otherwise + /** Returns true if field mapTasks is set (has been asigned a value) and false otherwise */ public boolean isSetMapTasks() { - return this.__isset.mapTasks; + return __isset_bit_vector.get(__MAPTASKS_ISSET_ID); + } + + public void setMapTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAPTASKS_ISSET_ID, value); } public int getReduceTasks() { @@ -160,16 +257,20 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable public void setReduceTasks(int reduceTasks) { this.reduceTasks = reduceTasks; - this.__isset.reduceTasks = true; + setReduceTasksIsSet(true); } public void unsetReduceTasks() { - this.__isset.reduceTasks = false; + __isset_bit_vector.clear(__REDUCETASKS_ISSET_ID); } - // Returns true if field reduceTasks is set (has been asigned a value) and false otherwise + /** Returns true if field reduceTasks is set (has been asigned a value) and false otherwise */ public boolean isSetReduceTasks() { - return this.__isset.reduceTasks; + return __isset_bit_vector.get(__REDUCETASKS_ISSET_ID); + } + + public void setReduceTasksIsSet(boolean value) { + __isset_bit_vector.set(__REDUCETASKS_ISSET_ID, value); } public int getMaxMapTasks() { @@ -178,16 +279,20 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable public void setMaxMapTasks(int maxMapTasks) { this.maxMapTasks = maxMapTasks; - this.__isset.maxMapTasks = true; + setMaxMapTasksIsSet(true); } public void unsetMaxMapTasks() { - this.__isset.maxMapTasks = false; + __isset_bit_vector.clear(__MAXMAPTASKS_ISSET_ID); } - // Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise + /** Returns true if field maxMapTasks is set (has been asigned a value) and false otherwise */ public boolean isSetMaxMapTasks() { - return this.__isset.maxMapTasks; + return __isset_bit_vector.get(__MAXMAPTASKS_ISSET_ID); + } + + public void setMaxMapTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAXMAPTASKS_ISSET_ID, value); } public int getMaxReduceTasks() { @@ -196,39 +301,56 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable public void setMaxReduceTasks(int maxReduceTasks) { this.maxReduceTasks = maxReduceTasks; - this.__isset.maxReduceTasks = true; + setMaxReduceTasksIsSet(true); } public void unsetMaxReduceTasks() { - this.__isset.maxReduceTasks = false; + __isset_bit_vector.clear(__MAXREDUCETASKS_ISSET_ID); } - // Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise + /** Returns true if field maxReduceTasks is set (has been asigned a value) and false otherwise */ public boolean isSetMaxReduceTasks() { - return this.__isset.maxReduceTasks; + return __isset_bit_vector.get(__MAXREDUCETASKS_ISSET_ID); } - public int getState() { + public void setMaxReduceTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); + } + + /** + * + * @see JobTrackerState + */ + public JobTrackerState getState() { return this.state; } - public void setState(int state) { + /** + * + * @see JobTrackerState + */ + public void setState(JobTrackerState state) { this.state = state; - this.__isset.state = true; } public void unsetState() { - this.__isset.state = false; + this.state = null; } - // Returns true if field state is set (has been asigned a value) and false otherwise + /** Returns true if field state is set (has been asigned a value) and false otherwise */ public boolean isSetState() { - return this.__isset.state; + return this.state != null; + } + + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TASKTRACKERS: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TASK_TRACKERS: if (value == null) { unsetTaskTrackers(); } else { @@ -236,7 +358,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAPTASKS: + case MAP_TASKS: if (value == null) { unsetMapTasks(); } else { @@ -244,7 +366,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case REDUCETASKS: + case REDUCE_TASKS: if (value == null) { unsetReduceTasks(); } else { @@ -252,7 +374,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAXMAPTASKS: + case MAX_MAP_TASKS: if (value == null) { unsetMaxMapTasks(); } else { @@ -260,7 +382,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAXREDUCETASKS: + case MAX_REDUCE_TASKS: if (value == null) { unsetMaxReduceTasks(); } else { @@ -272,58 +394,58 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable if (value == null) { unsetState(); } else { - setState((Integer)value); + setState((JobTrackerState)value); } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case TASKTRACKERS: + public Object getFieldValue(_Fields field) { + switch (field) { + case TASK_TRACKERS: return new Integer(getTaskTrackers()); - case MAPTASKS: + case MAP_TASKS: return new Integer(getMapTasks()); - case REDUCETASKS: + case REDUCE_TASKS: return new Integer(getReduceTasks()); - case MAXMAPTASKS: + case MAX_MAP_TASKS: return new Integer(getMaxMapTasks()); - case MAXREDUCETASKS: + case MAX_REDUCE_TASKS: return new Integer(getMaxReduceTasks()); case STATE: return getState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case TASKTRACKERS: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TASK_TRACKERS: return isSetTaskTrackers(); - case MAPTASKS: + case MAP_TASKS: return isSetMapTasks(); - case REDUCETASKS: + case REDUCE_TASKS: return isSetReduceTasks(); - case MAXMAPTASKS: + case MAX_MAP_TASKS: return isSetMaxMapTasks(); - case MAXREDUCETASKS: + case MAX_REDUCE_TASKS: return isSetMaxReduceTasks(); case STATE: return isSetState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -384,12 +506,12 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable return false; } - boolean this_present_state = true; - boolean that_present_state = true; + boolean this_present_state = true && this.isSetState(); + boolean that_present_state = true && that.isSetState(); if (this_present_state || that_present_state) { if (!(this_present_state && that_present_state)) return false; - if (this.state != that.state) + if (!this.state.equals(that.state)) return false; } @@ -401,6 +523,81 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable return 0; } + public int compareTo(HiveClusterStatus other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveClusterStatus typedOther = (HiveClusterStatus)other; + + lastComparison = Boolean.valueOf(isSetTaskTrackers()).compareTo(typedOther.isSetTaskTrackers()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTaskTrackers()) { + lastComparison = TBaseHelper.compareTo(this.taskTrackers, typedOther.taskTrackers); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMapTasks()).compareTo(typedOther.isSetMapTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMapTasks()) { + lastComparison = TBaseHelper.compareTo(this.mapTasks, typedOther.mapTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetReduceTasks()).compareTo(typedOther.isSetReduceTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetReduceTasks()) { + lastComparison = TBaseHelper.compareTo(this.reduceTasks, typedOther.reduceTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxMapTasks()).compareTo(typedOther.isSetMaxMapTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxMapTasks()) { + lastComparison = TBaseHelper.compareTo(this.maxMapTasks, typedOther.maxMapTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxReduceTasks()).compareTo(typedOther.isSetMaxReduceTasks()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxReduceTasks()) { + lastComparison = TBaseHelper.compareTo(this.maxReduceTasks, typedOther.maxReduceTasks); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetState()).compareTo(typedOther.isSetState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetState()) { + lastComparison = TBaseHelper.compareTo(this.state, typedOther.state); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -410,64 +607,60 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable if (field.type == TType.STOP) { break; } - switch (field.id) - { - case TASKTRACKERS: + switch (field.id) { + case 1: // TASK_TRACKERS if (field.type == TType.I32) { this.taskTrackers = iprot.readI32(); - this.__isset.taskTrackers = true; + setTaskTrackersIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAPTASKS: + case 2: // MAP_TASKS if (field.type == TType.I32) { this.mapTasks = iprot.readI32(); - this.__isset.mapTasks = true; + setMapTasksIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case REDUCETASKS: + case 3: // REDUCE_TASKS if (field.type == TType.I32) { this.reduceTasks = iprot.readI32(); - this.__isset.reduceTasks = true; + setReduceTasksIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAXMAPTASKS: + case 4: // MAX_MAP_TASKS if (field.type == TType.I32) { this.maxMapTasks = iprot.readI32(); - this.__isset.maxMapTasks = true; + setMaxMapTasksIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MAXREDUCETASKS: + case 5: // MAX_REDUCE_TASKS if (field.type == TType.I32) { this.maxReduceTasks = iprot.readI32(); - this.__isset.maxReduceTasks = true; + setMaxReduceTasksIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case STATE: + case 6: // STATE if (field.type == TType.I32) { - this.state = iprot.readI32(); - this.__isset.state = true; + this.state = JobTrackerState.findByValue(iprot.readI32()); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -490,9 +683,11 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC); oprot.writeI32(this.maxReduceTasks); oprot.writeFieldEnd(); - oprot.writeFieldBegin(STATE_FIELD_DESC); - oprot.writeI32(this.state); - oprot.writeFieldEnd(); + if (this.state != null) { + oprot.writeFieldBegin(STATE_FIELD_DESC); + oprot.writeI32(this.state.getValue()); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -523,14 +718,10 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable first = false; if (!first) sb.append(", "); sb.append("state:"); - String state_name = JobTrackerState.VALUES_TO_NAMES.get(this.state); - if (state_name != null) { - sb.append(state_name); - sb.append(" ("); - } - sb.append(this.state); - if (state_name != null) { - sb.append(")"); + if (this.state == null) { + sb.append("null"); + } else { + sb.append(this.state); } first = false; sb.append(")"); @@ -539,10 +730,6 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values - if (isSetState() && !JobTrackerState.VALID_VALUES.contains(state)){ - throw new TProtocolException("The field 'state' has been assigned the invalid value " + state); - } } } diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java index 08594e1..2935206 100644 --- service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java +++ service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java @@ -9,43 +9,112 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; -public class HiveServerException extends Exception implements TBase, java.io.Serializable, Cloneable { +public class HiveServerException extends Exception implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("HiveServerException"); + private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1); private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.I32, (short)2); private static final TField SQLSTATE_FIELD_DESC = new TField("SQLState", TType.STRING, (short)3); private String message; - public static final int MESSAGE = 1; private int errorCode; - public static final int ERRORCODE = 2; private String SQLState; - public static final int SQLSTATE = 3; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean errorCode = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + MESSAGE((short)1, "message"), + ERROR_CODE((short)2, "errorCode"), + SQLSTATE((short)3, "SQLState"); + + 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; + case 2: // ERROR_CODE + return ERROR_CODE; + case 3: // SQLSTATE + return SQLSTATE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, + // isset id assignments + private static final int __ERRORCODE_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(ERRORCODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - put(SQLSTATE, new FieldMetaData("SQLState", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.SQLSTATE, new FieldMetaData("SQLState", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(HiveServerException.class, metaDataMap); } @@ -60,7 +129,7 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser this(); this.message = message; this.errorCode = errorCode; - this.__isset.errorCode = true; + setErrorCodeIsSet(true); this.SQLState = SQLState; } @@ -68,21 +137,29 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser * Performs a deep copy on other. */ public HiveServerException(HiveServerException other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); if (other.isSetMessage()) { this.message = other.message; } - __isset.errorCode = other.__isset.errorCode; this.errorCode = other.errorCode; if (other.isSetSQLState()) { this.SQLState = other.SQLState; } } - @Override - public HiveServerException clone() { + public HiveServerException deepCopy() { return new HiveServerException(this); } + @Override + public void clear() { + this.message = null; + setErrorCodeIsSet(false); + this.errorCode = 0; + this.SQLState = null; + } + public String getMessage() { return this.message; } @@ -95,27 +172,37 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser this.message = null; } - // Returns true if field message is set (has been asigned a value) and false otherwise + /** Returns true if field message is set (has been asigned a value) and false otherwise */ public boolean isSetMessage() { return this.message != null; } + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + public int getErrorCode() { return this.errorCode; } public void setErrorCode(int errorCode) { this.errorCode = errorCode; - this.__isset.errorCode = true; + setErrorCodeIsSet(true); } public void unsetErrorCode() { - this.__isset.errorCode = false; + __isset_bit_vector.clear(__ERRORCODE_ISSET_ID); } - // Returns true if field errorCode is set (has been asigned a value) and false otherwise + /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */ public boolean isSetErrorCode() { - return this.__isset.errorCode; + return __isset_bit_vector.get(__ERRORCODE_ISSET_ID); + } + + public void setErrorCodeIsSet(boolean value) { + __isset_bit_vector.set(__ERRORCODE_ISSET_ID, value); } public String getSQLState() { @@ -130,13 +217,19 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser this.SQLState = null; } - // Returns true if field SQLState is set (has been asigned a value) and false otherwise + /** Returns true if field SQLState is set (has been asigned a value) and false otherwise */ public boolean isSetSQLState() { return this.SQLState != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setSQLStateIsSet(boolean value) { + if (!value) { + this.SQLState = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case MESSAGE: if (value == null) { unsetMessage(); @@ -145,7 +238,7 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser } break; - case ERRORCODE: + case ERROR_CODE: if (value == null) { unsetErrorCode(); } else { @@ -161,39 +254,39 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case MESSAGE: return getMessage(); - case ERRORCODE: + case ERROR_CODE: return new Integer(getErrorCode()); case SQLSTATE: return getSQLState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case MESSAGE: return isSetMessage(); - case ERRORCODE: + case ERROR_CODE: return isSetErrorCode(); case SQLSTATE: return isSetSQLState(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -244,6 +337,51 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser return 0; } + public int compareTo(HiveServerException other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + HiveServerException typedOther = (HiveServerException)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetErrorCode()) { + lastComparison = TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetSQLState()).compareTo(typedOther.isSetSQLState()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSQLState()) { + lastComparison = TBaseHelper.compareTo(this.SQLState, typedOther.SQLState); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -253,24 +391,23 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MESSAGE: + switch (field.id) { + case 1: // MESSAGE if (field.type == TType.STRING) { this.message = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case ERRORCODE: + case 2: // ERROR_CODE if (field.type == TType.I32) { this.errorCode = iprot.readI32(); - this.__isset.errorCode = true; + setErrorCodeIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case SQLSTATE: + case 3: // SQLSTATE if (field.type == TType.STRING) { this.SQLState = iprot.readString(); } else { @@ -279,12 +416,10 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -339,7 +474,6 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java index 67d0229..d2cdabd 100644 --- service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java +++ service/src/gen-javabean/org/apache/hadoop/hive/service/JobTrackerState.java @@ -6,23 +6,39 @@ package org.apache.hadoop.hive.service; -import java.util.Set; -import java.util.HashSet; -import java.util.Collections; -import org.apache.thrift.IntRangeSet; import java.util.Map; import java.util.HashMap; +import org.apache.thrift.TEnum; -public class JobTrackerState { - public static final int INITIALIZING = 1; - public static final int RUNNING = 2; +public enum JobTrackerState implements TEnum { + INITIALIZING(1), + RUNNING(2); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - INITIALIZING, - RUNNING ); + private final int value; - public static final Map VALUES_TO_NAMES = new HashMap() {{ - put(INITIALIZING, "INITIALIZING"); - put(RUNNING, "RUNNING"); - }}; + private JobTrackerState(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + public static JobTrackerState findByValue(int value) { + switch (value) { + case 1: + return INITIALIZING; + case 2: + return RUNNING; + default: + return null; + } + } } diff --git service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java index e3160ca..a21dd8c 100644 --- service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java +++ service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java @@ -9,13 +9,21 @@ 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 org.apache.log4j.Logger; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.apache.thrift.*; +import org.apache.thrift.async.*; import org.apache.thrift.meta_data.*; +import org.apache.thrift.transport.*; import org.apache.thrift.protocol.*; public class ThriftHive { @@ -40,7 +48,37 @@ public class ThriftHive { } - public static class Client extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Client implements Iface { + public interface AsyncIface extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore .AsyncIface { + + public void execute(String query, AsyncMethodCallback resultHandler) throws TException; + + public void fetchOne(AsyncMethodCallback resultHandler) throws TException; + + public void fetchN(int numRows, AsyncMethodCallback resultHandler) throws TException; + + public void fetchAll(AsyncMethodCallback resultHandler) throws TException; + + public void getSchema(AsyncMethodCallback resultHandler) throws TException; + + public void getThriftSchema(AsyncMethodCallback resultHandler) throws TException; + + public void getClusterStatus(AsyncMethodCallback resultHandler) throws TException; + + public void getQueryPlan(AsyncMethodCallback resultHandler) throws TException; + + } + + public static class Client extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Client implements TServiceClient, Iface { + public static class Factory implements TServiceClientFactory { + public Factory() {} + public Client getClient(TProtocol prot) { + return new Client(prot); + } + public Client getClient(TProtocol iprot, TProtocol oprot) { + return new Client(iprot, oprot); + } + } + public Client(TProtocol prot) { this(prot, prot); @@ -59,9 +97,9 @@ public class ThriftHive { public void send_execute(String query) throws TException { - oprot_.writeMessageBegin(new TMessage("execute", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("execute", TMessageType.CALL, ++seqid_)); execute_args args = new execute_args(); - args.query = query; + args.setQuery(query); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -75,6 +113,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "execute failed: out of sequence response"); + } execute_result result = new execute_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -92,7 +133,7 @@ public class ThriftHive { public void send_fetchOne() throws TException { - oprot_.writeMessageBegin(new TMessage("fetchOne", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("fetchOne", TMessageType.CALL, ++seqid_)); fetchOne_args args = new fetchOne_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -107,6 +148,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "fetchOne failed: out of sequence response"); + } fetchOne_result result = new fetchOne_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -127,9 +171,9 @@ public class ThriftHive { public void send_fetchN(int numRows) throws TException { - oprot_.writeMessageBegin(new TMessage("fetchN", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("fetchN", TMessageType.CALL, ++seqid_)); fetchN_args args = new fetchN_args(); - args.numRows = numRows; + args.setNumRows(numRows); args.write(oprot_); oprot_.writeMessageEnd(); oprot_.getTransport().flush(); @@ -143,6 +187,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "fetchN failed: out of sequence response"); + } fetchN_result result = new fetchN_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -163,7 +210,7 @@ public class ThriftHive { public void send_fetchAll() throws TException { - oprot_.writeMessageBegin(new TMessage("fetchAll", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("fetchAll", TMessageType.CALL, ++seqid_)); fetchAll_args args = new fetchAll_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -178,6 +225,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "fetchAll failed: out of sequence response"); + } fetchAll_result result = new fetchAll_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -198,7 +248,7 @@ public class ThriftHive { public void send_getSchema() throws TException { - oprot_.writeMessageBegin(new TMessage("getSchema", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getSchema", TMessageType.CALL, ++seqid_)); getSchema_args args = new getSchema_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -213,6 +263,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getSchema failed: out of sequence response"); + } getSchema_result result = new getSchema_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -233,7 +286,7 @@ public class ThriftHive { public void send_getThriftSchema() throws TException { - oprot_.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.CALL, ++seqid_)); getThriftSchema_args args = new getThriftSchema_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -248,6 +301,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getThriftSchema failed: out of sequence response"); + } getThriftSchema_result result = new getThriftSchema_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -268,7 +324,7 @@ public class ThriftHive { public void send_getClusterStatus() throws TException { - oprot_.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.CALL, ++seqid_)); getClusterStatus_args args = new getClusterStatus_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -283,6 +339,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getClusterStatus failed: out of sequence response"); + } getClusterStatus_result result = new getClusterStatus_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -303,7 +362,7 @@ public class ThriftHive { public void send_getQueryPlan() throws TException { - oprot_.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.CALL, seqid_)); + oprot_.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.CALL, ++seqid_)); getQueryPlan_args args = new getQueryPlan_args(); args.write(oprot_); oprot_.writeMessageEnd(); @@ -318,6 +377,9 @@ public class ThriftHive { iprot_.readMessageEnd(); throw x; } + if (msg.seqid != seqid_) { + throw new TApplicationException(TApplicationException.BAD_SEQUENCE_ID, "getQueryPlan failed: out of sequence response"); + } getQueryPlan_result result = new getQueryPlan_result(); result.read(iprot_); iprot_.readMessageEnd(); @@ -331,8 +393,257 @@ public class ThriftHive { } } + public static class AsyncClient extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.AsyncClient implements AsyncIface { + public static class Factory implements TAsyncClientFactory { + private TAsyncClientManager clientManager; + private TProtocolFactory protocolFactory; + public Factory(TAsyncClientManager clientManager, TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(TProtocolFactory protocolFactory, TAsyncClientManager clientManager, TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void execute(String query, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + execute_call method_call = new execute_call(query, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class execute_call extends TAsyncMethodCall { + private String query; + public execute_call(String query, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.query = query; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("execute", TMessageType.CALL, 0)); + execute_args args = new execute_args(); + args.setQuery(query); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_execute(); + } + } + + public void fetchOne(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + fetchOne_call method_call = new fetchOne_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class fetchOne_call extends TAsyncMethodCall { + public fetchOne_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("fetchOne", TMessageType.CALL, 0)); + fetchOne_args args = new fetchOne_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public String getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchOne(); + } + } + + public void fetchN(int numRows, AsyncMethodCallback resultHandler) throws TException { + checkReady(); + fetchN_call method_call = new fetchN_call(numRows, resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class fetchN_call extends TAsyncMethodCall { + private int numRows; + public fetchN_call(int numRows, AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + this.numRows = numRows; + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("fetchN", TMessageType.CALL, 0)); + fetchN_args args = new fetchN_args(); + args.setNumRows(numRows); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchN(); + } + } + + public void fetchAll(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + fetchAll_call method_call = new fetchAll_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class fetchAll_call extends TAsyncMethodCall { + public fetchAll_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("fetchAll", TMessageType.CALL, 0)); + fetchAll_args args = new fetchAll_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_fetchAll(); + } + } + + public void getSchema(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getSchema_call method_call = new getSchema_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getSchema_call extends TAsyncMethodCall { + public getSchema_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getSchema", TMessageType.CALL, 0)); + getSchema_args args = new getSchema_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public org.apache.hadoop.hive.metastore.api.Schema getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getSchema(); + } + } + + public void getThriftSchema(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getThriftSchema_call method_call = new getThriftSchema_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getThriftSchema_call extends TAsyncMethodCall { + public getThriftSchema_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.CALL, 0)); + getThriftSchema_args args = new getThriftSchema_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public org.apache.hadoop.hive.metastore.api.Schema getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getThriftSchema(); + } + } + + public void getClusterStatus(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getClusterStatus_call method_call = new getClusterStatus_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getClusterStatus_call extends TAsyncMethodCall { + public getClusterStatus_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.CALL, 0)); + getClusterStatus_args args = new getClusterStatus_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public HiveClusterStatus getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getClusterStatus(); + } + } + + public void getQueryPlan(AsyncMethodCallback resultHandler) throws TException { + checkReady(); + getQueryPlan_call method_call = new getQueryPlan_call(resultHandler, this, protocolFactory, transport); + manager.call(method_call); + } + + public static class getQueryPlan_call extends TAsyncMethodCall { + public getQueryPlan_call(AsyncMethodCallback resultHandler, TAsyncClient client, TProtocolFactory protocolFactory, TNonblockingTransport transport) throws TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(TProtocol prot) throws TException { + prot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.CALL, 0)); + getQueryPlan_args args = new getQueryPlan_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public org.apache.hadoop.hive.ql.plan.api.QueryPlan getResult() throws HiveServerException, TException { + if (getState() != State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + TMemoryInputTransport memoryTransport = new TMemoryInputTransport(getFrameBuffer().array()); + TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getQueryPlan(); + } + } + + } + public static class Processor extends org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Processor implements TProcessor { - private static final Logger LOGGER = Logger.getLogger(Processor.class.getName()); + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); public Processor(Iface iface) { super(iface); @@ -371,7 +682,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { execute_args args = new execute_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("execute", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); execute_result result = new execute_result(); try { @@ -399,7 +720,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { fetchOne_args args = new fetchOne_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("fetchOne", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); fetchOne_result result = new fetchOne_result(); try { @@ -427,7 +758,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { fetchN_args args = new fetchN_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("fetchN", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); fetchN_result result = new fetchN_result(); try { @@ -455,7 +796,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { fetchAll_args args = new fetchAll_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("fetchAll", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); fetchAll_result result = new fetchAll_result(); try { @@ -483,7 +834,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getSchema_args args = new getSchema_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getSchema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getSchema_result result = new getSchema_result(); try { @@ -511,7 +872,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getThriftSchema_args args = new getThriftSchema_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getThriftSchema", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getThriftSchema_result result = new getThriftSchema_result(); try { @@ -539,7 +910,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getClusterStatus_args args = new getClusterStatus_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getClusterStatus", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getClusterStatus_result result = new getClusterStatus_result(); try { @@ -567,7 +948,17 @@ public class ThriftHive { public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException { getQueryPlan_args args = new getQueryPlan_args(); - args.read(iprot); + try { + args.read(iprot); + } catch (TProtocolException e) { + iprot.readMessageEnd(); + TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR, e.getMessage()); + oprot.writeMessageBegin(new TMessage("getQueryPlan", TMessageType.EXCEPTION, seqid)); + x.write(oprot); + oprot.writeMessageEnd(); + oprot.getTransport().flush(); + return; + } iprot.readMessageEnd(); getQueryPlan_result result = new getQueryPlan_result(); try { @@ -593,23 +984,79 @@ public class ThriftHive { } - public static class execute_args implements TBase, java.io.Serializable, Cloneable { + public static class execute_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("execute_args"); + private static final TField QUERY_FIELD_DESC = new TField("query", TType.STRING, (short)1); private String query; - public static final int QUERY = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + QUERY((short)1, "query"); + + 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: // QUERY + return QUERY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(QUERY, new FieldMetaData("query", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.QUERY, new FieldMetaData("query", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(execute_args.class, metaDataMap); } @@ -632,11 +1079,15 @@ public class ThriftHive { } } - @Override - public execute_args clone() { + public execute_args deepCopy() { return new execute_args(this); } + @Override + public void clear() { + this.query = null; + } + public String getQuery() { return this.query; } @@ -649,13 +1100,19 @@ public class ThriftHive { this.query = null; } - // Returns true if field query is set (has been asigned a value) and false otherwise + /** Returns true if field query is set (has been asigned a value) and false otherwise */ public boolean isSetQuery() { return this.query != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setQueryIsSet(boolean value) { + if (!value) { + this.query = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case QUERY: if (value == null) { unsetQuery(); @@ -664,29 +1121,29 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case QUERY: return getQuery(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case QUERY: return isSetQuery(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -719,6 +1176,31 @@ public class ThriftHive { return 0; } + public int compareTo(execute_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + execute_args typedOther = (execute_args)other; + + lastComparison = Boolean.valueOf(isSetQuery()).compareTo(typedOther.isSetQuery()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetQuery()) { + lastComparison = TBaseHelper.compareTo(this.query, typedOther.query); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -728,9 +1210,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case QUERY: + switch (field.id) { + case 1: // QUERY if (field.type == TType.STRING) { this.query = iprot.readString(); } else { @@ -739,12 +1220,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -779,28 +1258,83 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class execute_result implements TBase, java.io.Serializable, Cloneable { + public static class execute_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("execute_result"); + private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(execute_result.class, metaDataMap); } @@ -823,11 +1357,15 @@ public class ThriftHive { } } - @Override - public execute_result clone() { + public execute_result deepCopy() { return new execute_result(this); } + @Override + public void clear() { + this.ex = null; + } + public HiveServerException getEx() { return this.ex; } @@ -840,13 +1378,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case EX: if (value == null) { unsetEx(); @@ -855,29 +1399,29 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -910,6 +1454,31 @@ public class ThriftHive { return 0; } + public int compareTo(execute_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + execute_result typedOther = (execute_result)other; + + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -919,9 +1488,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case EX: + switch (field.id) { + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -931,12 +1499,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -970,18 +1536,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class fetchOne_args implements TBase, java.io.Serializable, Cloneable { + public static class fetchOne_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("fetchOne_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchOne_args.class, metaDataMap); } @@ -994,31 +1616,34 @@ public class ThriftHive { public fetchOne_args(fetchOne_args other) { } - @Override - public fetchOne_args clone() { + public fetchOne_args deepCopy() { return new fetchOne_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); } + + switch (field) { + } + throw new IllegalStateException(); } @Override @@ -1042,6 +1667,21 @@ public class ThriftHive { return 0; } + public int compareTo(fetchOne_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchOne_args typedOther = (fetchOne_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1051,16 +1691,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1083,33 +1720,90 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class fetchOne_result implements TBase, java.io.Serializable, Cloneable { + public static class fetchOne_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("fetchOne_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private String success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRING))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchOne_result.class, metaDataMap); } @@ -1137,11 +1831,16 @@ public class ThriftHive { } } - @Override - public fetchOne_result clone() { + public fetchOne_result deepCopy() { return new fetchOne_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public String getSuccess() { return this.success; } @@ -1154,11 +1853,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -1171,13 +1876,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -1194,34 +1905,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -1263,6 +1974,41 @@ public class ThriftHive { return 0; } + public int compareTo(fetchOne_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchOne_result typedOther = (fetchOne_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1272,16 +2018,15 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRING) { this.success = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -1291,12 +2036,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1342,29 +2085,85 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class fetchN_args implements TBase, java.io.Serializable, Cloneable { + public static class fetchN_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("fetchN_args"); + private static final TField NUM_ROWS_FIELD_DESC = new TField("numRows", TType.I32, (short)1); private int numRows; - public static final int NUMROWS = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { - public boolean numRows = false; + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + NUM_ROWS((short)1, "numRows"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NUM_ROWS + return NUM_ROWS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(NUMROWS, new FieldMetaData("numRows", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); + // isset id assignments + private static final int __NUMROWS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NUM_ROWS, new FieldMetaData("numRows", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchN_args.class, metaDataMap); } @@ -1376,43 +2175,53 @@ public class ThriftHive { { this(); this.numRows = numRows; - this.__isset.numRows = true; + setNumRowsIsSet(true); } /** * Performs a deep copy on other. */ public fetchN_args(fetchN_args other) { - __isset.numRows = other.__isset.numRows; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.numRows = other.numRows; } - @Override - public fetchN_args clone() { + public fetchN_args deepCopy() { return new fetchN_args(this); } + @Override + public void clear() { + setNumRowsIsSet(false); + this.numRows = 0; + } + public int getNumRows() { return this.numRows; } public void setNumRows(int numRows) { this.numRows = numRows; - this.__isset.numRows = true; + setNumRowsIsSet(true); } public void unsetNumRows() { - this.__isset.numRows = false; + __isset_bit_vector.clear(__NUMROWS_ISSET_ID); } - // Returns true if field numRows is set (has been asigned a value) and false otherwise + /** Returns true if field numRows is set (has been asigned a value) and false otherwise */ public boolean isSetNumRows() { - return this.__isset.numRows; + return __isset_bit_vector.get(__NUMROWS_ISSET_ID); + } + + public void setNumRowsIsSet(boolean value) { + __isset_bit_vector.set(__NUMROWS_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NUMROWS: + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUM_ROWS: if (value == null) { unsetNumRows(); } else { @@ -1420,29 +2229,29 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NUMROWS: + public Object getFieldValue(_Fields field) { + switch (field) { + case NUM_ROWS: return new Integer(getNumRows()); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - case NUMROWS: + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NUM_ROWS: return isSetNumRows(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -1475,6 +2284,31 @@ public class ThriftHive { return 0; } + public int compareTo(fetchN_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchN_args typedOther = (fetchN_args)other; + + lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(typedOther.isSetNumRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumRows()) { + lastComparison = TBaseHelper.compareTo(this.numRows, typedOther.numRows); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1484,24 +2318,21 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case NUMROWS: + switch (field.id) { + case 1: // NUM_ROWS if (field.type == TType.I32) { this.numRows = iprot.readI32(); - this.__isset.numRows = true; + setNumRowsIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1530,34 +2361,91 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } - } + } + + public static class fetchN_result implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("fetchN_result"); + + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); + private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); + + private List success; + private HiveServerException ex; + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + 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); + } - public static class fetchN_result implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("fetchN_result"); - private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); - private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); + private final short _thriftId; + private final String _fieldName; - private List success; - public static final int SUCCESS = 0; - private HiveServerException ex; - public static final int EX = 1; + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchN_result.class, metaDataMap); } @@ -1589,11 +2477,16 @@ public class ThriftHive { } } - @Override - public fetchN_result clone() { + public fetchN_result deepCopy() { return new fetchN_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -1621,11 +2514,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -1638,13 +2537,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -1661,34 +2566,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -1730,6 +2635,41 @@ public class ThriftHive { return 0; } + public int compareTo(fetchN_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchN_result typedOther = (fetchN_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1739,9 +2679,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); @@ -1758,7 +2697,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -1768,12 +2707,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1784,7 +2721,8 @@ public class ThriftHive { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter3 : this.success) { + for (String _iter3 : this.success) + { oprot.writeString(_iter3); } oprot.writeListEnd(); @@ -1825,18 +2763,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class fetchAll_args implements TBase, java.io.Serializable, Cloneable { + public static class fetchAll_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("fetchAll_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchAll_args.class, metaDataMap); } @@ -1849,31 +2843,34 @@ public class ThriftHive { public fetchAll_args(fetchAll_args other) { } - @Override - public fetchAll_args clone() { + public fetchAll_args deepCopy() { return new fetchAll_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); } + + switch (field) { + } + throw new IllegalStateException(); } @Override @@ -1897,6 +2894,21 @@ public class ThriftHive { return 0; } + public int compareTo(fetchAll_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchAll_args typedOther = (fetchAll_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1906,16 +2918,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1938,34 +2947,91 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class fetchAll_result implements TBase, java.io.Serializable, Cloneable { + public static class fetchAll_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("fetchAll_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private List success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + // isset id assignments + + public static final Map<_Fields, FieldMetaData> metaDataMap; + static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRUCT))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(fetchAll_result.class, metaDataMap); } @@ -1997,11 +3063,16 @@ public class ThriftHive { } } - @Override - public fetchAll_result clone() { + public fetchAll_result deepCopy() { return new fetchAll_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public int getSuccessSize() { return (this.success == null) ? 0 : this.success.size(); } @@ -2029,11 +3100,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -2046,13 +3123,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -2069,34 +3152,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -2138,6 +3221,41 @@ public class ThriftHive { return 0; } + public int compareTo(fetchAll_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + fetchAll_result typedOther = (fetchAll_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2147,9 +3265,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.LIST) { { TList _list4 = iprot.readListBegin(); @@ -2166,7 +3283,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -2176,12 +3293,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2192,7 +3307,8 @@ public class ThriftHive { oprot.writeFieldBegin(SUCCESS_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.success.size())); - for (String _iter7 : this.success) { + for (String _iter7 : this.success) + { oprot.writeString(_iter7); } oprot.writeListEnd(); @@ -2233,18 +3349,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getSchema_args implements TBase, java.io.Serializable, Cloneable { + public static class getSchema_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getSchema_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getSchema_args.class, metaDataMap); } @@ -2257,31 +3429,34 @@ public class ThriftHive { public getSchema_args(getSchema_args other) { } - @Override - public getSchema_args clone() { + public getSchema_args deepCopy() { return new getSchema_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { } + throw new IllegalStateException(); } @Override @@ -2305,6 +3480,21 @@ public class ThriftHive { return 0; } + public int compareTo(getSchema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getSchema_args typedOther = (getSchema_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2314,16 +3504,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2346,33 +3533,90 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getSchema_result implements TBase, java.io.Serializable, Cloneable { + public static class getSchema_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getSchema_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private org.apache.hadoop.hive.metastore.api.Schema success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.metastore.api.Schema.class))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.metastore.api.Schema.class))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getSchema_result.class, metaDataMap); } @@ -2400,11 +3644,16 @@ public class ThriftHive { } } - @Override - public getSchema_result clone() { + public getSchema_result deepCopy() { return new getSchema_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { return this.success; } @@ -2417,11 +3666,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -2434,13 +3689,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -2457,34 +3718,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -2526,6 +3787,41 @@ public class ThriftHive { return 0; } + public int compareTo(getSchema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getSchema_result typedOther = (getSchema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2535,9 +3831,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new org.apache.hadoop.hive.metastore.api.Schema(); this.success.read(iprot); @@ -2545,7 +3840,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -2555,12 +3850,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2606,18 +3899,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getThriftSchema_args implements TBase, java.io.Serializable, Cloneable { + public static class getThriftSchema_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getThriftSchema_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getThriftSchema_args.class, metaDataMap); } @@ -2630,31 +3979,34 @@ public class ThriftHive { public getThriftSchema_args(getThriftSchema_args other) { } + public getThriftSchema_args deepCopy() { + return new getThriftSchema_args(this); + } + @Override - public getThriftSchema_args clone() { - return new getThriftSchema_args(this); + public void clear() { } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { } + throw new IllegalStateException(); } @Override @@ -2678,6 +4030,21 @@ public class ThriftHive { return 0; } + public int compareTo(getThriftSchema_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getThriftSchema_args typedOther = (getThriftSchema_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2687,16 +4054,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2719,33 +4083,90 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getThriftSchema_result implements TBase, java.io.Serializable, Cloneable { + public static class getThriftSchema_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getThriftSchema_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private org.apache.hadoop.hive.metastore.api.Schema success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.metastore.api.Schema.class))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.metastore.api.Schema.class))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getThriftSchema_result.class, metaDataMap); } @@ -2773,11 +4194,16 @@ public class ThriftHive { } } - @Override - public getThriftSchema_result clone() { + public getThriftSchema_result deepCopy() { return new getThriftSchema_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public org.apache.hadoop.hive.metastore.api.Schema getSuccess() { return this.success; } @@ -2790,11 +4216,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -2807,13 +4239,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -2830,34 +4268,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -2899,6 +4337,41 @@ public class ThriftHive { return 0; } + public int compareTo(getThriftSchema_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getThriftSchema_result typedOther = (getThriftSchema_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2908,9 +4381,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new org.apache.hadoop.hive.metastore.api.Schema(); this.success.read(iprot); @@ -2918,7 +4390,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -2928,12 +4400,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2979,18 +4449,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getClusterStatus_args implements TBase, java.io.Serializable, Cloneable { + public static class getClusterStatus_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getClusterStatus_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getClusterStatus_args.class, metaDataMap); } @@ -3003,31 +4529,34 @@ public class ThriftHive { public getClusterStatus_args(getClusterStatus_args other) { } - @Override - public getClusterStatus_args clone() { + public getClusterStatus_args deepCopy() { return new getClusterStatus_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { } + throw new IllegalStateException(); } @Override @@ -3051,6 +4580,21 @@ public class ThriftHive { return 0; } + public int compareTo(getClusterStatus_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getClusterStatus_args typedOther = (getClusterStatus_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3060,16 +4604,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3092,33 +4633,90 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getClusterStatus_result implements TBase, java.io.Serializable, Cloneable { + public static class getClusterStatus_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getClusterStatus_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private HiveClusterStatus success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, HiveClusterStatus.class))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, HiveClusterStatus.class))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getClusterStatus_result.class, metaDataMap); } @@ -3146,11 +4744,16 @@ public class ThriftHive { } } - @Override - public getClusterStatus_result clone() { + public getClusterStatus_result deepCopy() { return new getClusterStatus_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public HiveClusterStatus getSuccess() { return this.success; } @@ -3163,11 +4766,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -3180,13 +4789,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -3203,34 +4818,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -3272,6 +4887,41 @@ public class ThriftHive { return 0; } + public int compareTo(getClusterStatus_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getClusterStatus_result typedOther = (getClusterStatus_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3281,9 +4931,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new HiveClusterStatus(); this.success.read(iprot); @@ -3291,7 +4940,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -3301,12 +4950,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3352,18 +4999,74 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getQueryPlan_args implements TBase, java.io.Serializable, Cloneable { + public static class getQueryPlan_args implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getQueryPlan_args"); - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { +; + + 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) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getQueryPlan_args.class, metaDataMap); } @@ -3376,31 +5079,34 @@ public class ThriftHive { public getQueryPlan_args(getQueryPlan_args other) { } - @Override - public getQueryPlan_args clone() { + public getQueryPlan_args deepCopy() { return new getQueryPlan_args(this); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); } + + switch (field) { + } + throw new IllegalStateException(); } @Override @@ -3424,6 +5130,21 @@ public class ThriftHive { return 0; } + public int compareTo(getQueryPlan_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getQueryPlan_args typedOther = (getQueryPlan_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3433,16 +5154,13 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { + switch (field.id) { default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3465,33 +5183,90 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } - public static class getQueryPlan_result implements TBase, java.io.Serializable, Cloneable { + public static class getQueryPlan_result implements TBase, java.io.Serializable, Cloneable { private static final TStruct STRUCT_DESC = new TStruct("getQueryPlan_result"); + private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0); private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1); private org.apache.hadoop.hive.ql.plan.api.QueryPlan success; - public static final int SUCCESS = 0; private HiveServerException ex; - public static final int EX = 1; - private final Isset __isset = new Isset(); - private static final class Isset implements java.io.Serializable { + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements TFieldIdEnum { + SUCCESS((short)0, "success"), + EX((short)1, "ex"); + + 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: // EX + return EX; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, - new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.ql.plan.api.QueryPlan.class))); - put(EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRUCT))); - }}); + // isset id assignments + public static final Map<_Fields, FieldMetaData> metaDataMap; static { + Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, + new StructMetaData(TType.STRUCT, org.apache.hadoop.hive.ql.plan.api.QueryPlan.class))); + tmpMap.put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, + new FieldValueMetaData(TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(getQueryPlan_result.class, metaDataMap); } @@ -3519,11 +5294,16 @@ public class ThriftHive { } } - @Override - public getQueryPlan_result clone() { + public getQueryPlan_result deepCopy() { return new getQueryPlan_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public org.apache.hadoop.hive.ql.plan.api.QueryPlan getSuccess() { return this.success; } @@ -3536,11 +5316,17 @@ public class ThriftHive { this.success = null; } - // Returns true if field success is set (has been asigned a value) and false otherwise + /** Returns true if field success is set (has been asigned a value) and false otherwise */ public boolean isSetSuccess() { return this.success != null; } + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + public HiveServerException getEx() { return this.ex; } @@ -3553,13 +5339,19 @@ public class ThriftHive { this.ex = null; } - // Returns true if field ex is set (has been asigned a value) and false otherwise + /** Returns true if field ex is set (has been asigned a value) and false otherwise */ public boolean isSetEx() { return this.ex != null; } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setExIsSet(boolean value) { + if (!value) { + this.ex = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case SUCCESS: if (value == null) { unsetSuccess(); @@ -3576,34 +5368,34 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); case EX: return getEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } - // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise - public boolean isSet(int fieldID) { - switch (fieldID) { + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); } @Override @@ -3645,6 +5437,41 @@ public class ThriftHive { return 0; } + public int compareTo(getQueryPlan_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getQueryPlan_result typedOther = (getQueryPlan_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEx()) { + lastComparison = TBaseHelper.compareTo(this.ex, typedOther.ex); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3654,9 +5481,8 @@ public class ThriftHive { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case SUCCESS: + switch (field.id) { + case 0: // SUCCESS if (field.type == TType.STRUCT) { this.success = new org.apache.hadoop.hive.ql.plan.api.QueryPlan(); this.success.read(iprot); @@ -3664,7 +5490,7 @@ public class ThriftHive { TProtocolUtil.skip(iprot, field.type); } break; - case EX: + case 1: // EX if (field.type == TType.STRUCT) { this.ex = new HiveServerException(); this.ex.read(iprot); @@ -3674,12 +5500,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3725,7 +5549,6 @@ public class ThriftHive { public void validate() throws TException { // check for required fields - // check that fields of type enum have valid values } } diff --git service/src/gen-php/ThriftHive.php service/src/gen-php/ThriftHive.php deleted file mode 100644 index 48d281a..0000000 --- service/src/gen-php/ThriftHive.php +++ /dev/null @@ -1,1703 +0,0 @@ -send_execute($query); - $this->recv_execute(); - } - - public function send_execute($query) - { - $args = new ThriftHive_execute_args(); - $args->query = $query; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_execute() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_execute_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 ThriftHive_execute_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->ex !== null) { - throw $result->ex; - } - return; - } - - public function fetchOne() - { - $this->send_fetchOne(); - return $this->recv_fetchOne(); - } - - public function send_fetchOne() - { - $args = new ThriftHive_fetchOne_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_fetchOne() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchOne_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 ThriftHive_fetchOne_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("fetchOne failed: unknown result"); - } - - public function fetchN($numRows) - { - $this->send_fetchN($numRows); - return $this->recv_fetchN(); - } - - public function send_fetchN($numRows) - { - $args = new ThriftHive_fetchN_args(); - $args->numRows = $numRows; - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_fetchN() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchN_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 ThriftHive_fetchN_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("fetchN failed: unknown result"); - } - - public function fetchAll() - { - $this->send_fetchAll(); - return $this->recv_fetchAll(); - } - - public function send_fetchAll() - { - $args = new ThriftHive_fetchAll_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_fetchAll() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchAll_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 ThriftHive_fetchAll_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("fetchAll failed: unknown result"); - } - - public function getSchema() - { - $this->send_getSchema(); - return $this->recv_getSchema(); - } - - public function send_getSchema() - { - $args = new ThriftHive_getSchema_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getSchema() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getSchema_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 ThriftHive_getSchema_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("getSchema failed: unknown result"); - } - - public function getThriftSchema() - { - $this->send_getThriftSchema(); - return $this->recv_getThriftSchema(); - } - - public function send_getThriftSchema() - { - $args = new ThriftHive_getThriftSchema_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getThriftSchema() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getThriftSchema_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 ThriftHive_getThriftSchema_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("getThriftSchema failed: unknown result"); - } - - public function getClusterStatus() - { - $this->send_getClusterStatus(); - return $this->recv_getClusterStatus(); - } - - public function send_getClusterStatus() - { - $args = new ThriftHive_getClusterStatus_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getClusterStatus() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getClusterStatus_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 ThriftHive_getClusterStatus_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("getClusterStatus failed: unknown result"); - } - - public function getQueryPlan() - { - $this->send_getQueryPlan(); - return $this->recv_getQueryPlan(); - } - - public function send_getQueryPlan() - { - $args = new ThriftHive_getQueryPlan_args(); - $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); - if ($bin_accel) - { - thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); - } - else - { - $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_); - $args->write($this->output_); - $this->output_->writeMessageEnd(); - $this->output_->getTransport()->flush(); - } - } - - public function recv_getQueryPlan() - { - $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); - if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getQueryPlan_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 ThriftHive_getQueryPlan_result(); - $result->read($this->input_); - $this->input_->readMessageEnd(); - } - if ($result->success !== null) { - return $result->success; - } - if ($result->ex !== null) { - throw $result->ex; - } - throw new Exception("getQueryPlan failed: unknown result"); - } - -} - -// HELPER FUNCTIONS AND STRUCTURES - -class ThriftHive_execute_args { - static $_TSPEC; - - public $query = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'query', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['query'])) { - $this->query = $vals['query']; - } - } - } - - public function getName() { - return 'ThriftHive_execute_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->query); - } 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('ThriftHive_execute_args'); - if ($this->query !== null) { - $xfer += $output->writeFieldBegin('query', TType::STRING, 1); - $xfer += $output->writeString($this->query); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_execute_result { - static $_TSPEC; - - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_execute_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->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_execute_result'); - if ($this->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchOne_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_fetchOne_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('ThriftHive_fetchOne_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchOne_result { - static $_TSPEC; - - public $success = null; - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRING, - ), - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_fetchOne_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::STRING) { - $xfer += $input->readString($this->success); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_fetchOne_result'); - if ($this->success !== null) { - $xfer += $output->writeFieldBegin('success', TType::STRING, 0); - $xfer += $output->writeString($this->success); - $xfer += $output->writeFieldEnd(); - } - if ($this->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchN_args { - static $_TSPEC; - - public $numRows = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'numRows', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['numRows'])) { - $this->numRows = $vals['numRows']; - } - } - } - - public function getName() { - return 'ThriftHive_fetchN_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::I32) { - $xfer += $input->readI32($this->numRows); - } 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('ThriftHive_fetchN_args'); - if ($this->numRows !== null) { - $xfer += $output->writeFieldBegin('numRows', TType::I32, 1); - $xfer += $output->writeI32($this->numRows); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchN_result { - static $_TSPEC; - - public $success = null; - public $ex = 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' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_fetchN_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(); - $_size0 = 0; - $_etype3 = 0; - $xfer += $input->readListBegin($_etype3, $_size0); - for ($_i4 = 0; $_i4 < $_size0; ++$_i4) - { - $elem5 = null; - $xfer += $input->readString($elem5); - $this->success []= $elem5; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_fetchN_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 $iter6) - { - $xfer += $output->writeString($iter6); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchAll_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_fetchAll_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('ThriftHive_fetchAll_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_fetchAll_result { - static $_TSPEC; - - public $success = null; - public $ex = 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' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_fetchAll_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(); - $_size7 = 0; - $_etype10 = 0; - $xfer += $input->readListBegin($_etype10, $_size7); - for ($_i11 = 0; $_i11 < $_size7; ++$_i11) - { - $elem12 = null; - $xfer += $input->readString($elem12); - $this->success []= $elem12; - } - $xfer += $input->readListEnd(); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_fetchAll_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 $iter13) - { - $xfer += $output->writeString($iter13); - } - } - $output->writeListEnd(); - } - $xfer += $output->writeFieldEnd(); - } - if ($this->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getSchema_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_getSchema_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('ThriftHive_getSchema_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getSchema_result { - static $_TSPEC; - - public $success = null; - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Schema', - ), - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_getSchema_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 metastore_Schema(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_getSchema_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->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getThriftSchema_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_getThriftSchema_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('ThriftHive_getThriftSchema_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getThriftSchema_result { - static $_TSPEC; - - public $success = null; - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'metastore_Schema', - ), - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_getThriftSchema_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 metastore_Schema(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_getThriftSchema_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->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getClusterStatus_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_getClusterStatus_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('ThriftHive_getClusterStatus_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getClusterStatus_result { - static $_TSPEC; - - public $success = null; - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'HiveClusterStatus', - ), - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_getClusterStatus_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 HiveClusterStatus(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_getClusterStatus_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->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getQueryPlan_args { - static $_TSPEC; - - - public function __construct() { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - ); - } - } - - public function getName() { - return 'ThriftHive_getQueryPlan_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('ThriftHive_getQueryPlan_args'); - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class ThriftHive_getQueryPlan_result { - static $_TSPEC; - - public $success = null; - public $ex = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 0 => array( - 'var' => 'success', - 'type' => TType::STRUCT, - 'class' => 'QueryPlan', - ), - 1 => array( - 'var' => 'ex', - 'type' => TType::STRUCT, - 'class' => 'HiveServerException', - ), - ); - } - if (is_array($vals)) { - if (isset($vals['success'])) { - $this->success = $vals['success']; - } - if (isset($vals['ex'])) { - $this->ex = $vals['ex']; - } - } - } - - public function getName() { - return 'ThriftHive_getQueryPlan_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 QueryPlan(); - $xfer += $this->success->read($input); - } else { - $xfer += $input->skip($ftype); - } - break; - case 1: - if ($ftype == TType::STRUCT) { - $this->ex = new HiveServerException(); - $xfer += $this->ex->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('ThriftHive_getQueryPlan_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->ex !== null) { - $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); - $xfer += $this->ex->write($output); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -?> diff --git service/src/gen-php/hive_service/ThriftHive.php service/src/gen-php/hive_service/ThriftHive.php new file mode 100644 index 0000000..48d281a --- /dev/null +++ service/src/gen-php/hive_service/ThriftHive.php @@ -0,0 +1,1703 @@ +send_execute($query); + $this->recv_execute(); + } + + public function send_execute($query) + { + $args = new ThriftHive_execute_args(); + $args->query = $query; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'execute', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('execute', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_execute() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_execute_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 ThriftHive_execute_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->ex !== null) { + throw $result->ex; + } + return; + } + + public function fetchOne() + { + $this->send_fetchOne(); + return $this->recv_fetchOne(); + } + + public function send_fetchOne() + { + $args = new ThriftHive_fetchOne_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchOne', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchOne', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchOne() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchOne_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 ThriftHive_fetchOne_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("fetchOne failed: unknown result"); + } + + public function fetchN($numRows) + { + $this->send_fetchN($numRows); + return $this->recv_fetchN(); + } + + public function send_fetchN($numRows) + { + $args = new ThriftHive_fetchN_args(); + $args->numRows = $numRows; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchN', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchN', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchN() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchN_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 ThriftHive_fetchN_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("fetchN failed: unknown result"); + } + + public function fetchAll() + { + $this->send_fetchAll(); + return $this->recv_fetchAll(); + } + + public function send_fetchAll() + { + $args = new ThriftHive_fetchAll_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'fetchAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('fetchAll', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_fetchAll() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_fetchAll_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 ThriftHive_fetchAll_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("fetchAll failed: unknown result"); + } + + public function getSchema() + { + $this->send_getSchema(); + return $this->recv_getSchema(); + } + + public function send_getSchema() + { + $args = new ThriftHive_getSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getSchema_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 ThriftHive_getSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("getSchema failed: unknown result"); + } + + public function getThriftSchema() + { + $this->send_getThriftSchema(); + return $this->recv_getThriftSchema(); + } + + public function send_getThriftSchema() + { + $args = new ThriftHive_getThriftSchema_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getThriftSchema', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getThriftSchema', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getThriftSchema() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getThriftSchema_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 ThriftHive_getThriftSchema_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("getThriftSchema failed: unknown result"); + } + + public function getClusterStatus() + { + $this->send_getClusterStatus(); + return $this->recv_getClusterStatus(); + } + + public function send_getClusterStatus() + { + $args = new ThriftHive_getClusterStatus_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getClusterStatus', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getClusterStatus', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getClusterStatus() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getClusterStatus_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 ThriftHive_getClusterStatus_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("getClusterStatus failed: unknown result"); + } + + public function getQueryPlan() + { + $this->send_getQueryPlan(); + return $this->recv_getQueryPlan(); + } + + public function send_getQueryPlan() + { + $args = new ThriftHive_getQueryPlan_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getQueryPlan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getQueryPlan', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getQueryPlan() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'ThriftHive_getQueryPlan_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 ThriftHive_getQueryPlan_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->ex !== null) { + throw $result->ex; + } + throw new Exception("getQueryPlan failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class ThriftHive_execute_args { + static $_TSPEC; + + public $query = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'query', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['query'])) { + $this->query = $vals['query']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_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->query); + } 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('ThriftHive_execute_args'); + if ($this->query !== null) { + $xfer += $output->writeFieldBegin('query', TType::STRING, 1); + $xfer += $output->writeString($this->query); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_execute_result { + static $_TSPEC; + + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_execute_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->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_execute_result'); + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchOne_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('ThriftHive_fetchOne_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchOne_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRING, + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchOne_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::STRING) { + $xfer += $input->readString($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchOne_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::STRING, 0); + $xfer += $output->writeString($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_args { + static $_TSPEC; + + public $numRows = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'numRows', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['numRows'])) { + $this->numRows = $vals['numRows']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_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::I32) { + $xfer += $input->readI32($this->numRows); + } 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('ThriftHive_fetchN_args'); + if ($this->numRows !== null) { + $xfer += $output->writeFieldBegin('numRows', TType::I32, 1); + $xfer += $output->writeI32($this->numRows); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchN_result { + static $_TSPEC; + + public $success = null; + public $ex = 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' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchN_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(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $xfer += $input->readString($elem5); + $this->success []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchN_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 $iter6) + { + $xfer += $output->writeString($iter6); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_fetchAll_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('ThriftHive_fetchAll_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_fetchAll_result { + static $_TSPEC; + + public $success = null; + public $ex = 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' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_fetchAll_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(); + $_size7 = 0; + $_etype10 = 0; + $xfer += $input->readListBegin($_etype10, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $elem12 = null; + $xfer += $input->readString($elem12); + $this->success []= $elem12; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_fetchAll_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 $iter13) + { + $xfer += $output->writeString($iter13); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getSchema_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('ThriftHive_getSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getSchema_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 metastore_Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getSchema_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->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_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('ThriftHive_getThriftSchema_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getThriftSchema_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'metastore_Schema', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getThriftSchema_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 metastore_Schema(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getThriftSchema_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->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_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('ThriftHive_getClusterStatus_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getClusterStatus_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'HiveClusterStatus', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getClusterStatus_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 HiveClusterStatus(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getClusterStatus_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->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_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('ThriftHive_getQueryPlan_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ThriftHive_getQueryPlan_result { + static $_TSPEC; + + public $success = null; + public $ex = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'QueryPlan', + ), + 1 => array( + 'var' => 'ex', + 'type' => TType::STRUCT, + 'class' => 'HiveServerException', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['ex'])) { + $this->ex = $vals['ex']; + } + } + } + + public function getName() { + return 'ThriftHive_getQueryPlan_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 QueryPlan(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->ex = new HiveServerException(); + $xfer += $this->ex->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('ThriftHive_getQueryPlan_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->ex !== null) { + $xfer += $output->writeFieldBegin('ex', TType::STRUCT, 1); + $xfer += $this->ex->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git service/src/gen-php/hive_service/hive_service_types.php service/src/gen-php/hive_service/hive_service_types.php new file mode 100644 index 0000000..4ebe36e --- /dev/null +++ service/src/gen-php/hive_service/hive_service_types.php @@ -0,0 +1,311 @@ + 1, + 'RUNNING' => 2, +); + +final class JobTrackerState { + const INITIALIZING = 1; + const RUNNING = 2; + static public $__names = array( + 1 => 'INITIALIZING', + 2 => 'RUNNING', + ); +} + +class HiveClusterStatus { + static $_TSPEC; + + public $taskTrackers = null; + public $mapTasks = null; + public $reduceTasks = null; + public $maxMapTasks = null; + public $maxReduceTasks = null; + public $state = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'taskTrackers', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'mapTasks', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'reduceTasks', + 'type' => TType::I32, + ), + 4 => array( + 'var' => 'maxMapTasks', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'maxReduceTasks', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'state', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['taskTrackers'])) { + $this->taskTrackers = $vals['taskTrackers']; + } + if (isset($vals['mapTasks'])) { + $this->mapTasks = $vals['mapTasks']; + } + if (isset($vals['reduceTasks'])) { + $this->reduceTasks = $vals['reduceTasks']; + } + if (isset($vals['maxMapTasks'])) { + $this->maxMapTasks = $vals['maxMapTasks']; + } + if (isset($vals['maxReduceTasks'])) { + $this->maxReduceTasks = $vals['maxReduceTasks']; + } + if (isset($vals['state'])) { + $this->state = $vals['state']; + } + } + } + + public function getName() { + return 'HiveClusterStatus'; + } + + 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::I32) { + $xfer += $input->readI32($this->taskTrackers); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->mapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->reduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxMapTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxReduceTasks); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->state); + } 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('HiveClusterStatus'); + if ($this->taskTrackers !== null) { + $xfer += $output->writeFieldBegin('taskTrackers', TType::I32, 1); + $xfer += $output->writeI32($this->taskTrackers); + $xfer += $output->writeFieldEnd(); + } + if ($this->mapTasks !== null) { + $xfer += $output->writeFieldBegin('mapTasks', TType::I32, 2); + $xfer += $output->writeI32($this->mapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->reduceTasks !== null) { + $xfer += $output->writeFieldBegin('reduceTasks', TType::I32, 3); + $xfer += $output->writeI32($this->reduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxMapTasks !== null) { + $xfer += $output->writeFieldBegin('maxMapTasks', TType::I32, 4); + $xfer += $output->writeI32($this->maxMapTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxReduceTasks !== null) { + $xfer += $output->writeFieldBegin('maxReduceTasks', TType::I32, 5); + $xfer += $output->writeI32($this->maxReduceTasks); + $xfer += $output->writeFieldEnd(); + } + if ($this->state !== null) { + $xfer += $output->writeFieldBegin('state', TType::I32, 6); + $xfer += $output->writeI32($this->state); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class HiveServerException extends TException { + static $_TSPEC; + + public $message = null; + public $errorCode = null; + public $SQLState = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'errorCode', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'SQLState', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + if (isset($vals['errorCode'])) { + $this->errorCode = $vals['errorCode']; + } + if (isset($vals['SQLState'])) { + $this->SQLState = $vals['SQLState']; + } + } + } + + public function getName() { + return 'HiveServerException'; + } + + 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; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->errorCode); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->SQLState); + } 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('HiveServerException'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + if ($this->errorCode !== null) { + $xfer += $output->writeFieldBegin('errorCode', TType::I32, 2); + $xfer += $output->writeI32($this->errorCode); + $xfer += $output->writeFieldEnd(); + } + if ($this->SQLState !== null) { + $xfer += $output->writeFieldBegin('SQLState', TType::STRING, 3); + $xfer += $output->writeString($this->SQLState); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git service/src/gen-php/hive_service_types.php service/src/gen-php/hive_service_types.php deleted file mode 100644 index 4ebe36e..0000000 --- service/src/gen-php/hive_service_types.php +++ /dev/null @@ -1,311 +0,0 @@ - 1, - 'RUNNING' => 2, -); - -final class JobTrackerState { - const INITIALIZING = 1; - const RUNNING = 2; - static public $__names = array( - 1 => 'INITIALIZING', - 2 => 'RUNNING', - ); -} - -class HiveClusterStatus { - static $_TSPEC; - - public $taskTrackers = null; - public $mapTasks = null; - public $reduceTasks = null; - public $maxMapTasks = null; - public $maxReduceTasks = null; - public $state = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'taskTrackers', - 'type' => TType::I32, - ), - 2 => array( - 'var' => 'mapTasks', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'reduceTasks', - 'type' => TType::I32, - ), - 4 => array( - 'var' => 'maxMapTasks', - 'type' => TType::I32, - ), - 5 => array( - 'var' => 'maxReduceTasks', - 'type' => TType::I32, - ), - 6 => array( - 'var' => 'state', - 'type' => TType::I32, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['taskTrackers'])) { - $this->taskTrackers = $vals['taskTrackers']; - } - if (isset($vals['mapTasks'])) { - $this->mapTasks = $vals['mapTasks']; - } - if (isset($vals['reduceTasks'])) { - $this->reduceTasks = $vals['reduceTasks']; - } - if (isset($vals['maxMapTasks'])) { - $this->maxMapTasks = $vals['maxMapTasks']; - } - if (isset($vals['maxReduceTasks'])) { - $this->maxReduceTasks = $vals['maxReduceTasks']; - } - if (isset($vals['state'])) { - $this->state = $vals['state']; - } - } - } - - public function getName() { - return 'HiveClusterStatus'; - } - - 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::I32) { - $xfer += $input->readI32($this->taskTrackers); - } else { - $xfer += $input->skip($ftype); - } - break; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->mapTasks); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->reduceTasks); - } else { - $xfer += $input->skip($ftype); - } - break; - case 4: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->maxMapTasks); - } else { - $xfer += $input->skip($ftype); - } - break; - case 5: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->maxReduceTasks); - } else { - $xfer += $input->skip($ftype); - } - break; - case 6: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->state); - } 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('HiveClusterStatus'); - if ($this->taskTrackers !== null) { - $xfer += $output->writeFieldBegin('taskTrackers', TType::I32, 1); - $xfer += $output->writeI32($this->taskTrackers); - $xfer += $output->writeFieldEnd(); - } - if ($this->mapTasks !== null) { - $xfer += $output->writeFieldBegin('mapTasks', TType::I32, 2); - $xfer += $output->writeI32($this->mapTasks); - $xfer += $output->writeFieldEnd(); - } - if ($this->reduceTasks !== null) { - $xfer += $output->writeFieldBegin('reduceTasks', TType::I32, 3); - $xfer += $output->writeI32($this->reduceTasks); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxMapTasks !== null) { - $xfer += $output->writeFieldBegin('maxMapTasks', TType::I32, 4); - $xfer += $output->writeI32($this->maxMapTasks); - $xfer += $output->writeFieldEnd(); - } - if ($this->maxReduceTasks !== null) { - $xfer += $output->writeFieldBegin('maxReduceTasks', TType::I32, 5); - $xfer += $output->writeI32($this->maxReduceTasks); - $xfer += $output->writeFieldEnd(); - } - if ($this->state !== null) { - $xfer += $output->writeFieldBegin('state', TType::I32, 6); - $xfer += $output->writeI32($this->state); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -class HiveServerException extends TException { - static $_TSPEC; - - public $message = null; - public $errorCode = null; - public $SQLState = null; - - public function __construct($vals=null) { - if (!isset(self::$_TSPEC)) { - self::$_TSPEC = array( - 1 => array( - 'var' => 'message', - 'type' => TType::STRING, - ), - 2 => array( - 'var' => 'errorCode', - 'type' => TType::I32, - ), - 3 => array( - 'var' => 'SQLState', - 'type' => TType::STRING, - ), - ); - } - if (is_array($vals)) { - if (isset($vals['message'])) { - $this->message = $vals['message']; - } - if (isset($vals['errorCode'])) { - $this->errorCode = $vals['errorCode']; - } - if (isset($vals['SQLState'])) { - $this->SQLState = $vals['SQLState']; - } - } - } - - public function getName() { - return 'HiveServerException'; - } - - 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; - case 2: - if ($ftype == TType::I32) { - $xfer += $input->readI32($this->errorCode); - } else { - $xfer += $input->skip($ftype); - } - break; - case 3: - if ($ftype == TType::STRING) { - $xfer += $input->readString($this->SQLState); - } 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('HiveServerException'); - if ($this->message !== null) { - $xfer += $output->writeFieldBegin('message', TType::STRING, 1); - $xfer += $output->writeString($this->message); - $xfer += $output->writeFieldEnd(); - } - if ($this->errorCode !== null) { - $xfer += $output->writeFieldBegin('errorCode', TType::I32, 2); - $xfer += $output->writeI32($this->errorCode); - $xfer += $output->writeFieldEnd(); - } - if ($this->SQLState !== null) { - $xfer += $output->writeFieldBegin('SQLState', TType::STRING, 3); - $xfer += $output->writeString($this->SQLState); - $xfer += $output->writeFieldEnd(); - } - $xfer += $output->writeFieldStop(); - $xfer += $output->writeStructEnd(); - return $xfer; - } - -} - -?> diff --git service/src/gen-py/hive/ThriftHive-remote service/src/gen-py/hive/ThriftHive-remote deleted file mode 100755 index c7e636e..0000000 --- service/src/gen-py/hive/ThriftHive-remote +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -import sys -import pprint -from urlparse import urlparse -from thrift.transport import TTransport -from thrift.transport import TSocket -from thrift.transport import THttpClient -from thrift.protocol import TBinaryProtocol - -import ThriftHive -from ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' - print '' - print 'Functions:' - print ' void execute(string query)' - print ' string fetchOne()' - print ' fetchN(i32 numRows)' - print ' fetchAll()' - print ' string getSchema()' - print '' - sys.exit(0) - -pp = pprint.PrettyPrinter(indent = 2) -host = 'localhost' -port = 9090 -uri = '' -framed = False -http = False -argi = 1 - -if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - port = int(parts[1]) - argi += 2 - -if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - http = True - argi += 2 - -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 - -cmd = sys.argv[argi] -args = sys.argv[argi+1:] - -if http: - transport = THttpClient.THttpClient(host, port, uri) -else: - socket = TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol.TBinaryProtocol(transport) -client = ThriftHive.Client(protocol) -transport.open() - -if cmd == 'execute': - if len(args) != 1: - print 'execute requires 1 args' - sys.exit(1) - pp.pprint(client.execute(args[0],)) - -elif cmd == 'fetchOne': - if len(args) != 0: - print 'fetchOne requires 0 args' - sys.exit(1) - pp.pprint(client.fetchOne()) - -elif cmd == 'fetchN': - if len(args) != 1: - print 'fetchN requires 1 args' - sys.exit(1) - pp.pprint(client.fetchN(eval(args[0]),)) - -elif cmd == 'fetchAll': - if len(args) != 0: - print 'fetchAll requires 0 args' - sys.exit(1) - pp.pprint(client.fetchAll()) - -elif cmd == 'getSchema': - if len(args) != 0: - print 'getSchema requires 0 args' - sys.exit(1) - pp.pprint(client.getSchema()) - -transport.close() diff --git service/src/gen-py/hive/ThriftHive.py service/src/gen-py/hive/ThriftHive.py deleted file mode 100644 index 6bf3422..0000000 --- service/src/gen-py/hive/ThriftHive.py +++ /dev/null @@ -1,860 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * -import hive_metastore.ThriftHiveMetastore -from ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class Iface(hive_metastore.ThriftHiveMetastore.Iface): - def execute(self, query): - pass - - def fetchOne(self, ): - pass - - def fetchN(self, numRows): - pass - - def fetchAll(self, ): - pass - - def getSchema(self, ): - pass - - -class Client(hive_metastore.ThriftHiveMetastore.Client, Iface): - def __init__(self, iprot, oprot=None): - hive_metastore.ThriftHiveMetastore.Client.__init__(self, iprot, oprot) - - def execute(self, query): - self.send_execute(query) - self.recv_execute() - - def send_execute(self, query): - self._oprot.writeMessageBegin('execute', TMessageType.CALL, self._seqid) - args = execute_args() - args.query = query - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_execute(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = execute_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.ex != None: - raise result.ex - return - - def fetchOne(self, ): - self.send_fetchOne() - return self.recv_fetchOne() - - def send_fetchOne(self, ): - self._oprot.writeMessageBegin('fetchOne', TMessageType.CALL, self._seqid) - args = fetchOne_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_fetchOne(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = fetchOne_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.ex != None: - raise result.ex - raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchOne failed: unknown result"); - - def fetchN(self, numRows): - self.send_fetchN(numRows) - return self.recv_fetchN() - - def send_fetchN(self, numRows): - self._oprot.writeMessageBegin('fetchN', TMessageType.CALL, self._seqid) - args = fetchN_args() - args.numRows = numRows - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_fetchN(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = fetchN_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.ex != None: - raise result.ex - raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchN failed: unknown result"); - - def fetchAll(self, ): - self.send_fetchAll() - return self.recv_fetchAll() - - def send_fetchAll(self, ): - self._oprot.writeMessageBegin('fetchAll', TMessageType.CALL, self._seqid) - args = fetchAll_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_fetchAll(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = fetchAll_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.ex != None: - raise result.ex - raise TApplicationException(TApplicationException.MISSING_RESULT, "fetchAll failed: unknown result"); - - def getSchema(self, ): - self.send_getSchema() - return self.recv_getSchema() - - def send_getSchema(self, ): - self._oprot.writeMessageBegin('getSchema', TMessageType.CALL, self._seqid) - args = getSchema_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getSchema(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getSchema_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.ex != None: - raise result.ex - raise TApplicationException(TApplicationException.MISSING_RESULT, "getSchema failed: unknown result"); - - -class Processor(hive_metastore.ThriftHiveMetastore.Processor, Iface, TProcessor): - def __init__(self, handler): - hive_metastore.ThriftHiveMetastore.Processor.__init__(self, handler) - self._processMap["execute"] = Processor.process_execute - self._processMap["fetchOne"] = Processor.process_fetchOne - self._processMap["fetchN"] = Processor.process_fetchN - self._processMap["fetchAll"] = Processor.process_fetchAll - self._processMap["getSchema"] = Processor.process_getSchema - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_execute(self, seqid, iprot, oprot): - args = execute_args() - args.read(iprot) - iprot.readMessageEnd() - result = execute_result() - try: - self._handler.execute(args.query) - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("execute", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_fetchOne(self, seqid, iprot, oprot): - args = fetchOne_args() - args.read(iprot) - iprot.readMessageEnd() - result = fetchOne_result() - try: - result.success = self._handler.fetchOne() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("fetchOne", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_fetchN(self, seqid, iprot, oprot): - args = fetchN_args() - args.read(iprot) - iprot.readMessageEnd() - result = fetchN_result() - try: - result.success = self._handler.fetchN(args.numRows) - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("fetchN", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_fetchAll(self, seqid, iprot, oprot): - args = fetchAll_args() - args.read(iprot) - iprot.readMessageEnd() - result = fetchAll_result() - try: - result.success = self._handler.fetchAll() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("fetchAll", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getSchema(self, seqid, iprot, oprot): - args = getSchema_args() - args.read(iprot) - iprot.readMessageEnd() - result = getSchema_result() - try: - result.success = self._handler.getSchema() - except HiveServerException, ex: - result.ex = ex - oprot.writeMessageBegin("getSchema", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class execute_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'query', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.query = None - if isinstance(d, dict): - if 'query' in d: - self.query = d['query'] - - 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.query = 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('execute_args') - if self.query != None: - oprot.writeFieldBegin('query', TType.STRING, 1) - oprot.writeString(self.query) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class execute_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.ex = None - if isinstance(d, dict): - if 'ex' in d: - self.ex = d['ex'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.ex = HiveServerException() - self.ex.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('execute_result') - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchOne_args: - - thrift_spec = ( - ) - - def __init__(self, d=None): - pass - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fetchOne_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchOne_result: - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.ex = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'ex' in d: - self.ex = d['ex'] - - 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.STRING: - self.success = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.ex = HiveServerException() - self.ex.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('fetchOne_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchN_args: - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'numRows', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.numRows = None - if isinstance(d, dict): - if 'numRows' in d: - self.numRows = d['numRows'] - - 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.I32: - self.numRows = iprot.readI32(); - 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('fetchN_args') - if self.numRows != None: - oprot.writeFieldBegin('numRows', TType.I32, 1) - oprot.writeI32(self.numRows) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchN_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.ex = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'ex' in d: - self.ex = d['ex'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = iprot.readString(); - self.success.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.ex = HiveServerException() - self.ex.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('fetchN_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter6 in self.success: - oprot.writeString(iter6) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchAll_args: - - thrift_spec = ( - ) - - def __init__(self, d=None): - pass - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('fetchAll_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class fetchAll_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.ex = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'ex' in d: - self.ex = d['ex'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in xrange(_size7): - _elem12 = iprot.readString(); - self.success.append(_elem12) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.ex = HiveServerException() - self.ex.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('fetchAll_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter13 in self.success: - oprot.writeString(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getSchema_args: - - thrift_spec = ( - ) - - def __init__(self, d=None): - pass - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getSchema_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getSchema_result: - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'ex', (HiveServerException, HiveServerException.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.ex = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'ex' in d: - self.ex = d['ex'] - - 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.STRING: - self.success = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.ex = HiveServerException() - self.ex.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('getSchema_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.ex != None: - oprot.writeFieldBegin('ex', TType.STRUCT, 1) - self.ex.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - diff --git service/src/gen-py/hive/__init__.py service/src/gen-py/hive/__init__.py deleted file mode 100644 index 6a0dcc9..0000000 --- service/src/gen-py/hive/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'ThriftHive'] diff --git service/src/gen-py/hive/constants.py service/src/gen-py/hive/constants.py deleted file mode 100644 index 2f17ec3..0000000 --- service/src/gen-py/hive/constants.py +++ /dev/null @@ -1,9 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * -from ttypes import * - diff --git service/src/gen-py/hive/ttypes.py service/src/gen-py/hive/ttypes.py deleted file mode 100644 index 87079f4..0000000 --- service/src/gen-py/hive/ttypes.py +++ /dev/null @@ -1,71 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * -import fb303.ttypes -import hive_metastore.ttypes - - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class HiveServerException(Exception): - - thrift_spec = None - def __init__(self, d=None): - self.message = None - if isinstance(d, dict): - if 'message' in d: - self.message = d['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('HiveServerException') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, -1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - diff --git service/src/gen-py/hive_service/ThriftHive-remote service/src/gen-py/hive_service/ThriftHive-remote old mode 100644 new mode 100755 index af87cdc..b641989 --- service/src/gen-py/hive_service/ThriftHive-remote +++ service/src/gen-py/hive_service/ThriftHive-remote @@ -41,20 +41,22 @@ http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') + parts = sys.argv[argi+1].split(':') host = parts[0] port = int(parts[1]) argi += 2 if sys.argv[argi] == '-u': url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') + parts = url[1].split(':') host = parts[0] if len(parts) > 1: port = int(parts[1]) else: port = 80 uri = url[2] + if url[4]: + uri += '?%s' % url[4] http = True argi += 2 @@ -125,4 +127,8 @@ elif cmd == 'getQueryPlan': sys.exit(1) pp.pprint(client.getQueryPlan()) +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + transport.close() diff --git service/src/gen-py/hive_service/ThriftHive.py service/src/gen-py/hive_service/ThriftHive.py index e40baa8..9277ced 100644 --- service/src/gen-py/hive_service/ThriftHive.py +++ service/src/gen-py/hive_service/ThriftHive.py @@ -9,7 +9,7 @@ import hive_metastore.ThriftHiveMetastore from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -465,6 +465,9 @@ class execute_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -522,6 +525,9 @@ class execute_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -560,6 +566,9 @@ class fetchOne_args: oprot.writeStructBegin('fetchOne_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -628,6 +637,9 @@ class fetchOne_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -684,6 +696,9 @@ class fetchN_args: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -760,6 +775,9 @@ class fetchN_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -798,6 +816,9 @@ class fetchAll_args: oprot.writeStructBegin('fetchAll_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -874,6 +895,9 @@ class fetchAll_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -912,6 +936,9 @@ class getSchema_args: oprot.writeStructBegin('getSchema_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -981,6 +1008,9 @@ class getSchema_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1019,6 +1049,9 @@ class getThriftSchema_args: oprot.writeStructBegin('getThriftSchema_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1088,6 +1121,9 @@ class getThriftSchema_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1126,6 +1162,9 @@ class getClusterStatus_args: oprot.writeStructBegin('getClusterStatus_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1195,6 +1234,9 @@ class getClusterStatus_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1233,6 +1275,9 @@ class getQueryPlan_args: oprot.writeStructBegin('getQueryPlan_args') oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1302,6 +1347,9 @@ class getQueryPlan_result: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -1313,5 +1361,3 @@ class getQueryPlan_result: def __ne__(self, other): return not (self == other) - - diff --git service/src/gen-py/hive_service/ttypes.py service/src/gen-py/hive_service/ttypes.py index 3e52549..467f812 100644 --- service/src/gen-py/hive_service/ttypes.py +++ service/src/gen-py/hive_service/ttypes.py @@ -11,7 +11,7 @@ import queryplan.ttypes from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol +from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.protocol import fastbinary except: @@ -22,6 +22,17 @@ class JobTrackerState: INITIALIZING = 1 RUNNING = 2 + _VALUES_TO_NAMES = { + 1: "INITIALIZING", + 2: "RUNNING", + } + + _NAMES_TO_VALUES = { + "INITIALIZING": 1, + "RUNNING": 2, + } + + class HiveClusterStatus: """ Attributes: @@ -126,6 +137,9 @@ class HiveClusterStatus: oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __repr__(self): L = ['%s=%r' % (key, value) @@ -206,6 +220,9 @@ class HiveServerException(Exception): oprot.writeFieldEnd() oprot.writeFieldStop() oprot.writeStructEnd() + def validate(self): + return + def __str__(self): return repr(self) @@ -220,4 +237,3 @@ class HiveServerException(Exception): def __ne__(self, other): return not (self == other) - diff --git service/src/gen-rb/ThriftHive.rb service/src/gen-rb/ThriftHive.rb deleted file mode 100644 index 5d07344..0000000 --- service/src/gen-rb/ThriftHive.rb +++ /dev/null @@ -1,241 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -require 'thrift/protocol/tprotocol' -require 'ThriftHiveMetastore' -require 'thrift/thrift' -require 'hive_service_types' - -module ThriftHive - class Client < ThriftHiveMetastore::Client - include ThriftClient - - def execute(query) - send_execute(query) - recv_execute() - end - - def send_execute(query) - send_message('execute', Execute_args, :query => query) - end - - def recv_execute() - result = receive_message(Execute_result) - raise result.ex unless result.ex.nil? - return - end - - def fetchOne() - send_fetchOne() - return recv_fetchOne() - end - - def send_fetchOne() - send_message('fetchOne', FetchOne_args) - end - - def recv_fetchOne() - result = receive_message(FetchOne_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise TApplicationException.new(TApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result') - end - - def fetchN(numRows) - send_fetchN(numRows) - return recv_fetchN() - end - - def send_fetchN(numRows) - send_message('fetchN', FetchN_args, :numRows => numRows) - end - - def recv_fetchN() - result = receive_message(FetchN_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise TApplicationException.new(TApplicationException::MISSING_RESULT, 'fetchN failed: unknown result') - end - - def fetchAll() - send_fetchAll() - return recv_fetchAll() - end - - def send_fetchAll() - send_message('fetchAll', FetchAll_args) - end - - def recv_fetchAll() - result = receive_message(FetchAll_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise TApplicationException.new(TApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result') - end - - def getSchema() - send_getSchema() - return recv_getSchema() - end - - def send_getSchema() - send_message('getSchema', GetSchema_args) - end - - def recv_getSchema() - result = receive_message(GetSchema_result) - return result.success unless result.success.nil? - raise result.ex unless result.ex.nil? - raise TApplicationException.new(TApplicationException::MISSING_RESULT, 'getSchema failed: unknown result') - end - - end - - class Processor < ThriftHiveMetastore::Processor - include TProcessor - - def process_execute(seqid, iprot, oprot) - args = read_args(iprot, Execute_args) - result = Execute_result.new() - begin - @handler.execute(args.query) - rescue HiveServerException => ex - result.ex = ex - end - write_result(result, oprot, 'execute', seqid) - end - - def process_fetchOne(seqid, iprot, oprot) - args = read_args(iprot, FetchOne_args) - result = FetchOne_result.new() - begin - result.success = @handler.fetchOne() - rescue HiveServerException => ex - result.ex = ex - end - write_result(result, oprot, 'fetchOne', seqid) - end - - def process_fetchN(seqid, iprot, oprot) - args = read_args(iprot, FetchN_args) - result = FetchN_result.new() - begin - result.success = @handler.fetchN(args.numRows) - rescue HiveServerException => ex - result.ex = ex - end - write_result(result, oprot, 'fetchN', seqid) - end - - def process_fetchAll(seqid, iprot, oprot) - args = read_args(iprot, FetchAll_args) - result = FetchAll_result.new() - begin - result.success = @handler.fetchAll() - rescue HiveServerException => ex - result.ex = ex - end - write_result(result, oprot, 'fetchAll', seqid) - end - - def process_getSchema(seqid, iprot, oprot) - args = read_args(iprot, GetSchema_args) - result = GetSchema_result.new() - begin - result.success = @handler.getSchema() - rescue HiveServerException => ex - result.ex = ex - end - write_result(result, oprot, 'getSchema', seqid) - end - - end - - # HELPER FUNCTIONS AND STRUCTURES - - class Execute_args - include ThriftStruct - attr_accessor :query - FIELDS = { - 1 => {:type => TType::STRING, :name => 'query'} - } - end - - class Execute_result - include ThriftStruct - attr_accessor :ex - FIELDS = { - 1 => {:type => TType::STRUCT, :name => 'ex', :class => HiveServerException} - } - end - - class FetchOne_args - include ThriftStruct - FIELDS = { - - } - end - - class FetchOne_result - include ThriftStruct - attr_accessor :success, :ex - FIELDS = { - 0 => {:type => TType::STRING, :name => 'success'}, - 1 => {:type => TType::STRUCT, :name => 'ex', :class => HiveServerException} - } - end - - class FetchN_args - include ThriftStruct - attr_accessor :numRows - FIELDS = { - 1 => {:type => TType::I32, :name => 'numRows'} - } - end - - class FetchN_result - include ThriftStruct - attr_accessor :success, :ex - FIELDS = { - 0 => {:type => TType::LIST, :name => 'success', :element => {:type => TType::STRING}}, - 1 => {:type => TType::STRUCT, :name => 'ex', :class => HiveServerException} - } - end - - class FetchAll_args - include ThriftStruct - FIELDS = { - - } - end - - class FetchAll_result - include ThriftStruct - attr_accessor :success, :ex - FIELDS = { - 0 => {:type => TType::LIST, :name => 'success', :element => {:type => TType::STRING}}, - 1 => {:type => TType::STRUCT, :name => 'ex', :class => HiveServerException} - } - end - - class GetSchema_args - include ThriftStruct - FIELDS = { - - } - end - - class GetSchema_result - include ThriftStruct - attr_accessor :success, :ex - FIELDS = { - 0 => {:type => TType::STRING, :name => 'success'}, - 1 => {:type => TType::STRUCT, :name => 'ex', :class => HiveServerException} - } - end - -end - diff --git service/src/gen-rb/hive_service_constants.rb service/src/gen-rb/hive_service_constants.rb index 2ebda01..730f6cc 100644 --- service/src/gen-rb/hive_service_constants.rb +++ service/src/gen-rb/hive_service_constants.rb @@ -4,6 +4,5 @@ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # -require 'thrift/protocol/tprotocol' require 'hive_service_types' diff --git service/src/gen-rb/hive_service_types.rb service/src/gen-rb/hive_service_types.rb index 001fa29..6102824 100644 --- service/src/gen-rb/hive_service_types.rb +++ service/src/gen-rb/hive_service_types.rb @@ -4,21 +4,64 @@ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # -require 'thrift/protocol/tprotocol' require 'fb303_types' require 'hive_metastore_types' +require 'queryplan_types' -class HiveServerException < StandardError - include ThriftStruct - def initialize(message=nil) - super() - self.message = message +module JobTrackerState + INITIALIZING = 1 + RUNNING = 2 + VALUE_MAP = {1 => "INITIALIZING", 2 => "RUNNING"} + VALID_VALUES = Set.new([INITIALIZING, RUNNING]).freeze +end + +class HiveClusterStatus + include ::Thrift::Struct, ::Thrift::Struct_Union + TASKTRACKERS = 1 + MAPTASKS = 2 + REDUCETASKS = 3 + MAXMAPTASKS = 4 + MAXREDUCETASKS = 5 + STATE = 6 + + FIELDS = { + TASKTRACKERS => {:type => ::Thrift::Types::I32, :name => 'taskTrackers'}, + MAPTASKS => {:type => ::Thrift::Types::I32, :name => 'mapTasks'}, + REDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'reduceTasks'}, + MAXMAPTASKS => {:type => ::Thrift::Types::I32, :name => 'maxMapTasks'}, + MAXREDUCETASKS => {:type => ::Thrift::Types::I32, :name => 'maxReduceTasks'}, + STATE => {:type => ::Thrift::Types::I32, :name => 'state', :enum_class => JobTrackerState} + } + + def struct_fields; FIELDS; end + + def validate + unless @state.nil? || JobTrackerState::VALID_VALUES.include?(@state) + raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!') + end end - attr_accessor :message + ::Thrift::Struct.generate_accessors self +end + +class HiveServerException < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + MESSAGE = 1 + ERRORCODE = 2 + SQLSTATE = 3 + FIELDS = { - -1 => {:type => TType::STRING, :name => 'message'} + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}, + ERRORCODE => {:type => ::Thrift::Types::I32, :name => 'errorCode'}, + SQLSTATE => {:type => ::Thrift::Types::STRING, :name => 'SQLState'} } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self end diff --git service/src/gen-rb/thrift_hive.rb service/src/gen-rb/thrift_hive.rb new file mode 100644 index 0000000..926f643 --- /dev/null +++ service/src/gen-rb/thrift_hive.rb @@ -0,0 +1,504 @@ +# +# Autogenerated by Thrift +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'thrift_hive_metastore' +require 'hive_service_types' + +module ThriftHive + class Client < ThriftHiveMetastore::Client + include ::Thrift::Client + + def execute(query) + send_execute(query) + recv_execute() + end + + def send_execute(query) + send_message('execute', Execute_args, :query => query) + end + + def recv_execute() + result = receive_message(Execute_result) + raise result.ex unless result.ex.nil? + return + end + + def fetchOne() + send_fetchOne() + return recv_fetchOne() + end + + def send_fetchOne() + send_message('fetchOne', FetchOne_args) + end + + def recv_fetchOne() + result = receive_message(FetchOne_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result') + end + + def fetchN(numRows) + send_fetchN(numRows) + return recv_fetchN() + end + + def send_fetchN(numRows) + send_message('fetchN', FetchN_args, :numRows => numRows) + end + + def recv_fetchN() + result = receive_message(FetchN_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result') + end + + def fetchAll() + send_fetchAll() + return recv_fetchAll() + end + + def send_fetchAll() + send_message('fetchAll', FetchAll_args) + end + + def recv_fetchAll() + result = receive_message(FetchAll_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result') + end + + def getSchema() + send_getSchema() + return recv_getSchema() + end + + def send_getSchema() + send_message('getSchema', GetSchema_args) + end + + def recv_getSchema() + result = receive_message(GetSchema_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result') + end + + def getThriftSchema() + send_getThriftSchema() + return recv_getThriftSchema() + end + + def send_getThriftSchema() + send_message('getThriftSchema', GetThriftSchema_args) + end + + def recv_getThriftSchema() + result = receive_message(GetThriftSchema_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result') + end + + def getClusterStatus() + send_getClusterStatus() + return recv_getClusterStatus() + end + + def send_getClusterStatus() + send_message('getClusterStatus', GetClusterStatus_args) + end + + def recv_getClusterStatus() + result = receive_message(GetClusterStatus_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result') + end + + def getQueryPlan() + send_getQueryPlan() + return recv_getQueryPlan() + end + + def send_getQueryPlan() + send_message('getQueryPlan', GetQueryPlan_args) + end + + def recv_getQueryPlan() + result = receive_message(GetQueryPlan_result) + return result.success unless result.success.nil? + raise result.ex unless result.ex.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result') + end + + end + + class Processor < ThriftHiveMetastore::Processor + include ::Thrift::Processor + + def process_execute(seqid, iprot, oprot) + args = read_args(iprot, Execute_args) + result = Execute_result.new() + begin + @handler.execute(args.query) + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'execute', seqid) + end + + def process_fetchOne(seqid, iprot, oprot) + args = read_args(iprot, FetchOne_args) + result = FetchOne_result.new() + begin + result.success = @handler.fetchOne() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchOne', seqid) + end + + def process_fetchN(seqid, iprot, oprot) + args = read_args(iprot, FetchN_args) + result = FetchN_result.new() + begin + result.success = @handler.fetchN(args.numRows) + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchN', seqid) + end + + def process_fetchAll(seqid, iprot, oprot) + args = read_args(iprot, FetchAll_args) + result = FetchAll_result.new() + begin + result.success = @handler.fetchAll() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'fetchAll', seqid) + end + + def process_getSchema(seqid, iprot, oprot) + args = read_args(iprot, GetSchema_args) + result = GetSchema_result.new() + begin + result.success = @handler.getSchema() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getSchema', seqid) + end + + def process_getThriftSchema(seqid, iprot, oprot) + args = read_args(iprot, GetThriftSchema_args) + result = GetThriftSchema_result.new() + begin + result.success = @handler.getThriftSchema() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getThriftSchema', seqid) + end + + def process_getClusterStatus(seqid, iprot, oprot) + args = read_args(iprot, GetClusterStatus_args) + result = GetClusterStatus_result.new() + begin + result.success = @handler.getClusterStatus() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getClusterStatus', seqid) + end + + def process_getQueryPlan(seqid, iprot, oprot) + args = read_args(iprot, GetQueryPlan_args) + result = GetQueryPlan_result.new() + begin + result.success = @handler.getQueryPlan() + rescue HiveServerException => ex + result.ex = ex + end + write_result(result, oprot, 'getQueryPlan', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class Execute_args + include ::Thrift::Struct, ::Thrift::Struct_Union + QUERY = 1 + + FIELDS = { + QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Execute_result + include ::Thrift::Struct, ::Thrift::Struct_Union + EX = 1 + + FIELDS = { + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchOne_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchOne_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchN_args + include ::Thrift::Struct, ::Thrift::Struct_Union + NUMROWS = 1 + + FIELDS = { + NUMROWS => {:type => ::Thrift::Types::I32, :name => 'numRows'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchN_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchAll_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class FetchAll_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetSchema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetSchema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetThriftSchema_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetThriftSchema_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Schema}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetClusterStatus_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetClusterStatus_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => HiveClusterStatus}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetQueryPlan_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetQueryPlan_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + EX = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => QueryPlan}, + EX => {:type => ::Thrift::Types::STRUCT, :name => 'ex', :class => HiveServerException} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + +end + diff --git service/src/java/org/apache/hadoop/hive/service/HiveServer.java service/src/java/org/apache/hadoop/hive/service/HiveServer.java index 89cf336..b7a2687 100644 --- service/src/java/org/apache/hadoop/hive/service/HiveServer.java +++ service/src/java/org/apache/hadoop/hive/service/HiveServer.java @@ -22,6 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import com.facebook.fb303.fb_status; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.hive.conf.HiveConf; @@ -145,7 +146,7 @@ public class HiveServer extends ThriftHive { JobTracker.State jbs = cs.getJobTrackerState(); // Convert the ClusterStatus to its Thrift equivalent: HiveClusterStatus - int state; + JobTrackerState state; switch (jbs) { case INITIALIZING: state = JobTrackerState.INITIALIZING; @@ -321,8 +322,8 @@ public class HiveServer extends ThriftHive { * Return the status of the server. */ @Override - public int getStatus() { - return 0; + public fb_status getStatus() { + return fb_status.ALIVE; } /**