commit 30fbdd15c0cbc2ddacc3fc60620c618d4f03b0fc Author: Todd Lipcon Date: Mon Sep 20 15:27:35 2010 -0700 Update to Thrift 0.4.0 diff --git lib/libfb303.jar lib/libfb303.jar index 516b597..998eeff 100644 Binary files lib/libfb303.jar and lib/libfb303.jar differ diff --git lib/libthrift.LICENSE lib/libthrift.LICENSE index 6b5c3b1..90b70c2 100644 --- lib/libthrift.LICENSE +++ lib/libthrift.LICENSE @@ -1,19 +1,331 @@ -Thrift Software License -Copyright © 2006- Facebook, Inc. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ -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: + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -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. + 1. Definitions. -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. + "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. + +-------------------------------------------------- +The following files are licensed under the MIT License: + lib/erl/build/beamver + lib/erl/build/buildtargets.mk + lib/erl/build/colors.mk + lib/erl/build/docs.mk + lib/erl/build/mime.types + lib/erl/build/otp.mk + lib/erl/build/otp_subdir.mk + lib/erl/build/raw_test.mk + lib/erl/src/Makefile + +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 lib/libthrift.jar lib/libthrift.jar index 7e7f90e..2c03835 100644 Binary files lib/libthrift.jar and lib/libthrift.jar differ diff --git lib/slf4j-api-1.6.1.jar lib/slf4j-api-1.6.1.jar new file mode 100644 index 0000000..42e0ad0 Binary files /dev/null and lib/slf4j-api-1.6.1.jar differ diff --git lib/slf4j-log4j12-1.6.1.jar lib/slf4j-log4j12-1.6.1.jar new file mode 100644 index 0000000..873d119 Binary files /dev/null and lib/slf4j-log4j12-1.6.1.jar differ diff --git lib/slf4j.LICENSE lib/slf4j.LICENSE new file mode 100644 index 0000000..f1c9e37 --- /dev/null +++ lib/slf4j.LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2004-2008 QOS.ch +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +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 AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF 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 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..9df9db0 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,20 @@ public class AlreadyExistsException extends Exception implements TBase, java.io. } } - @Override + public AlreadyExistsException deepCopy() { + return new AlreadyExistsException(this); + } + + @Deprecated public AlreadyExistsException clone() { return new AlreadyExistsException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..6a0596c 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,20 @@ public class ConfigValSecurityException extends Exception implements TBase, java } } - @Override + public ConfigValSecurityException deepCopy() { + return new ConfigValSecurityException(this); + } + + @Deprecated public ConfigValSecurityException clone() { return new ConfigValSecurityException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,10 @@ public class ConfigValSecurityException extends Exception implements TBase, java break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +308,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..bb564f5 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,22 @@ public class Database implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Database deepCopy() { + return new Database(this); + } + + @Deprecated public Database clone() { 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 +173,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 +196,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 +219,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 +248,7 @@ public class Database implements TBase, java.io.Serializable, Cloneable { } break; - case LOCATIONURI: + case LOCATION_URI: if (value == null) { unsetLocationUri(); } else { @@ -159,39 +256,47 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -242,6 +347,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -251,23 +394,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 +418,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 +482,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..111f1a6 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,22 @@ public class FieldSchema implements TBase, java.io.Serializable, Cloneable { } } - @Override + public FieldSchema deepCopy() { + return new FieldSchema(this); + } + + @Deprecated public FieldSchema clone() { 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 +173,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 +196,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 +219,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 +256,15 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); @@ -175,23 +274,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -242,6 +347,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -251,23 +394,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 +418,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 +482,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..d0b0c67 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,35 @@ 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 deepCopy() { + return new Index(this); + } + + @Deprecated public Index clone() { 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 +284,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 +307,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 +330,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 +353,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 +392,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 +420,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 +443,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 +477,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 +520,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case INDEXHANDLERCLASS: + case INDEX_HANDLER_CLASS: if (value == null) { unsetIndexHandlerClass(); } else { @@ -371,7 +528,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -379,7 +536,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case ORIGTABLENAME: + case ORIG_TABLE_NAME: if (value == null) { unsetOrigTableName(); } else { @@ -387,7 +544,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -395,7 +552,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -403,7 +560,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case INDEXTABLENAME: + case INDEX_TABLE_NAME: if (value == null) { unsetIndexTableName(); } else { @@ -427,7 +584,7 @@ public class Index implements TBase, java.io.Serializable, Cloneable { } break; - case DEFERREDREBUILD: + case DEFERRED_REBUILD: if (value == null) { unsetDeferredRebuild(); } else { @@ -435,32 +592,34 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +628,46 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -616,6 +781,107 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -625,60 +891,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 +951,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 +970,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 +1031,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 +1125,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..d95a618 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,20 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav } } - @Override + public IndexAlreadyExistsException deepCopy() { + return new IndexAlreadyExistsException(this); + } + + @Deprecated public IndexAlreadyExistsException clone() { return new IndexAlreadyExistsException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,10 @@ public class IndexAlreadyExistsException extends Exception implements TBase, jav break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +308,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..74d5cc1 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,20 @@ public class InvalidObjectException extends Exception implements TBase, java.io. } } - @Override + public InvalidObjectException deepCopy() { + return new InvalidObjectException(this); + } + + @Deprecated public InvalidObjectException clone() { return new InvalidObjectException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..6c0abc4 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,20 @@ public class InvalidOperationException extends Exception implements TBase, java. } } - @Override + public InvalidOperationException deepCopy() { + return new InvalidOperationException(this); + } + + @Deprecated public InvalidOperationException clone() { return new InvalidOperationException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,10 @@ public class InvalidOperationException extends Exception implements TBase, java. break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -204,7 +308,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..28704fc 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,20 @@ public class MetaException extends Exception implements TBase, java.io.Serializa } } - @Override + public MetaException deepCopy() { + return new MetaException(this); + } + + @Deprecated public MetaException clone() { return new MetaException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..d5fba2e 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,20 @@ public class NoSuchObjectException extends Exception implements TBase, java.io.S } } - @Override + public NoSuchObjectException deepCopy() { + return new NoSuchObjectException(this); + } + + @Deprecated public NoSuchObjectException clone() { return new NoSuchObjectException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..b5f60df 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,37 @@ 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 deepCopy() { + return new Order(this); + } + + @Deprecated public Order clone() { return new Order(this); } + @Override + public void clear() { + this.col = null; + setOrderIsSet(false); + this.order = 0; + } + public String getCol() { return this.col; } @@ -85,31 +164,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 +215,42 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case COL: return isSetCol(); case ORDER: return isSetOrder(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -195,6 +292,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -204,31 +330,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 +393,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..b381b6c 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,28 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Partition deepCopy() { + return new Partition(this); + } + + @Deprecated public Partition clone() { 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 +264,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 +287,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 +310,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 +349,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 +377,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 +411,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 +432,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -308,7 +440,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case TABLENAME: + case TABLE_NAME: if (value == null) { unsetTableName(); } else { @@ -316,7 +448,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -324,7 +456,7 @@ public class Partition implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -348,26 +480,28 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +510,37 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -487,6 +627,80 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -496,9 +710,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 +728,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 +766,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 +787,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 +802,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 +835,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 +906,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..742bcd8 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,21 @@ public class Schema implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Schema deepCopy() { + return new Schema(this); + } + + @Deprecated public Schema clone() { 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 +194,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 +228,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 +257,42 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { + case FIELD_SCHEMAS: return isSetFieldSchemas(); case PROPERTIES: return isSetProperties(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -238,6 +334,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -247,9 +372,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 +391,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 +412,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 +427,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 +439,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 +478,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..db60a1c --- 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,22 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { } } - @Override + public SerDeInfo deepCopy() { + return new SerDeInfo(this); + } + + @Deprecated public SerDeInfo clone() { 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 +187,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 +210,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 +244,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 +265,7 @@ public class SerDeInfo implements TBase, java.io.Serializable, Cloneable { } break; - case SERIALIZATIONLIB: + case SERIALIZATION_LIB: if (value == null) { unsetSerializationLib(); } else { @@ -184,39 +281,47 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -267,6 +372,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -276,23 +419,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 +455,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 +480,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 +527,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..ff5e337 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,31 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } } - @Override + public StorageDescriptor deepCopy() { + return new StorageDescriptor(this); + } + + @Deprecated public StorageDescriptor clone() { 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 +313,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 +336,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 +359,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 +382,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 +421,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 +449,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 +487,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 +525,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 +559,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 +588,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case INPUTFORMAT: + case INPUT_FORMAT: if (value == null) { unsetInputFormat(); } else { @@ -437,7 +596,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case OUTPUTFORMAT: + case OUTPUT_FORMAT: if (value == null) { unsetOutputFormat(); } else { @@ -453,7 +612,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case NUMBUCKETS: + case NUM_BUCKETS: if (value == null) { unsetNumBuckets(); } else { @@ -461,7 +620,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case SERDEINFO: + case SERDE_INFO: if (value == null) { unsetSerdeInfo(); } else { @@ -469,7 +628,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case BUCKETCOLS: + case BUCKET_COLS: if (value == null) { unsetBucketCols(); } else { @@ -477,7 +636,7 @@ public class StorageDescriptor implements TBase, java.io.Serializable, Cloneable } break; - case SORTCOLS: + case SORT_COLS: if (value == null) { unsetSortCols(); } else { @@ -493,74 +652,82 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -674,6 +841,107 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -683,9 +951,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 +970,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 +1015,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 +1032,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 +1050,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 +1071,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 +1086,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 +1124,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 +1136,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 +1148,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 +1243,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..c4873dc 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,34 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Table deepCopy() { + return new Table(this); + } + + @Deprecated public Table clone() { 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 +315,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 +338,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 +361,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 +400,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 +422,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 +450,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 +488,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 +522,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 +545,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 +568,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 +591,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 +612,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case DBNAME: + case DB_NAME: if (value == null) { unsetDbName(); } else { @@ -453,7 +628,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case CREATETIME: + case CREATE_TIME: if (value == null) { unsetCreateTime(); } else { @@ -461,7 +636,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case LASTACCESSTIME: + case LAST_ACCESS_TIME: if (value == null) { unsetLastAccessTime(); } else { @@ -485,7 +660,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case PARTITIONKEYS: + case PARTITION_KEYS: if (value == null) { unsetPartitionKeys(); } else { @@ -501,7 +676,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case VIEWORIGINALTEXT: + case VIEW_ORIGINAL_TEXT: if (value == null) { unsetViewOriginalText(); } else { @@ -509,7 +684,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case VIEWEXPANDEDTEXT: + case VIEW_EXPANDED_TEXT: if (value == null) { unsetViewExpandedText(); } else { @@ -517,7 +692,7 @@ public class Table implements TBase, java.io.Serializable, Cloneable { } break; - case TABLETYPE: + case TABLE_TYPE: if (value == null) { unsetTableType(); } else { @@ -525,26 +700,28 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +730,62 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -734,6 +917,125 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -743,54 +1045,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 +1099,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 +1117,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 +1136,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 +1159,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 +1203,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 +1215,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 +1337,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..9525174 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,20 @@ public class ThriftHiveMetastore { } } - @Override + public create_database_args deepCopy() { + return new create_database_args(this); + } + + @Deprecated public create_database_args clone() { return new create_database_args(this); } + @Override + public void clear() { + this.database = null; + } + public Database getDatabase() { return this.database; } @@ -2891,13 +4889,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 +4910,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DATABASE: return isSetDatabase(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2961,6 +4973,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2970,9 +5002,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 +5013,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3022,38 +5051,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 +5174,22 @@ public class ThriftHiveMetastore { } } - @Override + public create_database_result deepCopy() { + return new create_database_result(this); + } + + @Deprecated public create_database_result clone() { 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 +5202,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 +5225,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 +5248,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 +5285,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -3184,23 +5303,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3251,6 +5376,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3260,9 +5423,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 +5432,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 +5440,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 +5450,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3351,28 +5511,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 { + 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; - 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_database_args.class, metaDataMap); } @@ -3395,11 +5610,20 @@ public class ThriftHiveMetastore { } } - @Override + public get_database_args deepCopy() { + return new get_database_args(this); + } + + @Deprecated public get_database_args clone() { return new get_database_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -3412,13 +5636,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 +5657,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3482,6 +5720,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3491,9 +5749,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 +5759,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3542,38 +5797,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 +5920,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_database_result deepCopy() { + return new get_database_result(this); + } + + @Deprecated public get_database_result clone() { 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 +5948,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 +5971,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 +5994,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 +6031,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -3704,23 +6049,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3771,6 +6122,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3780,9 +6169,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 +6178,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 +6186,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 +6196,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3871,34 +6257,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 +6356,37 @@ 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 deepCopy() { + return new drop_database_args(this); + } + + @Deprecated public drop_database_args clone() { 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 +6399,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 NAME: if (value == null) { unsetName(); @@ -3976,7 +6442,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -3984,34 +6450,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -4053,6 +6527,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4062,31 +6565,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 +6628,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 +6751,22 @@ public class ThriftHiveMetastore { } } - @Override + public drop_database_result deepCopy() { + return new drop_database_result(this); + } + + @Deprecated public drop_database_result clone() { 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 +6779,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 +6802,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 +6825,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 +6862,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -4290,23 +6880,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -4357,6 +6953,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4366,9 +7000,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 +7009,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 +7017,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 +7027,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4457,28 +7088,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 +7187,20 @@ public class ThriftHiveMetastore { } } - @Override + public get_databases_args deepCopy() { + return new get_databases_args(this); + } + + @Deprecated public get_databases_args clone() { return new get_databases_args(this); } + @Override + public void clear() { + this.pattern = null; + } + public String getPattern() { return this.pattern; } @@ -4518,13 +7213,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 +7234,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case PATTERN: return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -4588,6 +7297,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4597,9 +7326,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 +7336,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4648,34 +7374,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 +7490,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_databases_result deepCopy() { + return new get_databases_result(this); + } + + @Deprecated public get_databases_result clone() { 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 +7532,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 +7555,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 +7584,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -4848,6 +7661,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -4857,9 +7699,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 +7717,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 +7727,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -4902,7 +7741,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 +7783,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 +7863,47 @@ public class ThriftHiveMetastore { public get_all_databases_args(get_all_databases_args other) { } - @Override + public get_all_databases_args deepCopy() { + return new get_all_databases_args(this); + } + + @Deprecated public get_all_databases_args clone() { return new get_all_databases_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -5015,6 +7927,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5024,16 +7947,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 +7976,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 +8092,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_all_databases_result deepCopy() { + return new get_all_databases_result(this); + } + + @Deprecated public get_all_databases_result clone() { 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 +8134,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 +8157,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 +8186,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -5256,6 +8263,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5265,9 +8301,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 +8319,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 +8329,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5310,7 +8343,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 +8385,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 +8484,20 @@ public class ThriftHiveMetastore { } } - @Override + public get_type_args deepCopy() { + return new get_type_args(this); + } + + @Deprecated public get_type_args clone() { return new get_type_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -5412,13 +8510,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 +8531,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -5482,6 +8594,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5491,9 +8623,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 +8633,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5542,38 +8671,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 +8794,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_type_result deepCopy() { + return new get_type_result(this); + } + + @Deprecated public get_type_result clone() { 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 +8822,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 +8845,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 +8868,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 +8905,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -5704,23 +8923,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -5771,6 +8996,44 @@ public class ThriftHiveMetastore { 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; + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -5780,9 +9043,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 +9052,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 +9060,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 +9070,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -5871,28 +9131,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 +9230,20 @@ public class ThriftHiveMetastore { } } - @Override + public create_type_args deepCopy() { + return new create_type_args(this); + } + + @Deprecated public create_type_args clone() { return new create_type_args(this); } + @Override + public void clear() { + this.type = null; + } + public Type getType() { return this.type; } @@ -5932,13 +9256,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 +9277,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case TYPE: return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -6002,6 +9340,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6011,9 +9369,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 +9380,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6063,44 +9418,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 +9532,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 +9542,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 +9556,44 @@ public class ThriftHiveMetastore { } } - @Override + public create_type_result deepCopy() { + return new create_type_result(this); + } + + @Deprecated public create_type_result clone() { 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 +9608,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 +9631,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 +9654,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 +9699,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -6265,14 +9720,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -6281,9 +9739,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -6343,6 +9804,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6352,17 +9860,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 +9877,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 +9885,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 +9895,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6459,28 +9964,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 +10063,20 @@ public class ThriftHiveMetastore { } } - @Override + public drop_type_args deepCopy() { + return new drop_type_args(this); + } + + @Deprecated public drop_type_args clone() { return new drop_type_args(this); } + @Override + public void clear() { + this.type = null; + } + public String getType() { return this.type; } @@ -6520,13 +10089,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 +10110,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case TYPE: return isSetType(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -6590,6 +10173,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6599,9 +10202,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 +10212,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6650,39 +10250,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 +10356,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -6705,7 +10365,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 +10376,43 @@ public class ThriftHiveMetastore { } } - @Override + public drop_type_result deepCopy() { + return new drop_type_result(this); + } + + @Deprecated public drop_type_result clone() { 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 +10427,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 +10450,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 +10487,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -6814,23 +10505,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -6881,6 +10578,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -6890,17 +10625,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 +10642,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 +10652,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -6977,28 +10709,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 +10808,20 @@ public class ThriftHiveMetastore { } } - @Override + public get_type_all_args deepCopy() { + return new get_type_all_args(this); + } + + @Deprecated public get_type_all_args clone() { return new get_type_all_args(this); } + @Override + public void clear() { + this.name = null; + } + public String getName() { return this.name; } @@ -7038,13 +10834,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 +10855,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case NAME: return isSetName(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -7108,6 +10918,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7117,9 +10947,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 +10957,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7168,35 +10995,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 +11120,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_type_all_result deepCopy() { + return new get_type_all_result(this); + } + + @Deprecated public get_type_all_result clone() { 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 +11158,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 +11181,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 +11210,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -7373,6 +11287,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7382,9 +11325,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 +11346,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 +11356,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7430,7 +11370,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 +11413,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 +11524,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_fields_args deepCopy() { + return new get_fields_args(this); + } + + @Deprecated public get_fields_args clone() { 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 +11551,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 +11574,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 +11603,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -7652,6 +11680,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -7661,16 +11718,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 +11735,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -7732,44 +11786,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 +11926,23 @@ public class ThriftHiveMetastore { } } - @Override + public get_fields_result deepCopy() { + return new get_fields_result(this); + } + + @Deprecated public get_fields_result clone() { 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 +11970,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 +11993,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 +12016,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 +12039,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 +12084,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -7952,14 +12105,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -7968,9 +12124,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -8030,6 +12189,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8039,9 +12245,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 +12264,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 +12272,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 +12280,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 +12290,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8101,7 +12304,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(); @@ -8164,35 +12368,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_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; + private String table_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"), + 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; - 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); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - private String db_name; - public static final int DB_NAME = 1; - private String table_name; - public static final int TABLE_NAME = 2; + 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, - 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 +12481,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_schema_args deepCopy() { + return new get_schema_args(this); + } + + @Deprecated public get_schema_args clone() { 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 +12508,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 +12531,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 +12560,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -8346,6 +12637,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8355,16 +12675,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 +12692,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8426,44 +12743,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 +12883,23 @@ public class ThriftHiveMetastore { } } - @Override + public get_schema_result deepCopy() { + return new get_schema_result(this); + } + + @Deprecated public get_schema_result clone() { 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 +12927,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 +12950,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 +12973,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 +12996,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 +13041,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -8646,14 +13062,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -8662,9 +13081,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -8724,6 +13146,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -8733,9 +13202,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 +13221,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 +13229,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 +13237,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 +13247,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -8795,7 +13261,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 +13327,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 +13426,20 @@ public class ThriftHiveMetastore { } } - @Override + public create_table_args deepCopy() { + return new create_table_args(this); + } + + @Deprecated public create_table_args clone() { return new create_table_args(this); } + @Override + public void clear() { + this.tbl = null; + } + public Table getTbl() { return this.tbl; } @@ -8921,13 +13452,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 +13473,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case TBL: return isSetTbl(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -8991,6 +13536,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9000,9 +13565,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 +13576,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -9052,43 +13614,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 +13749,23 @@ public class ThriftHiveMetastore { } } - @Override + public create_table_result deepCopy() { + return new create_table_result(this); + } + + @Deprecated public create_table_result clone() { 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 +13778,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 +13801,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 +13824,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 +13847,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 +13892,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case O1: return getO1(); @@ -9252,14 +13913,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case O1: return isSetO1(); case O2: @@ -9268,9 +13932,12 @@ public class ThriftHiveMetastore { return isSetO3(); case O4: return isSetO4(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -9330,6 +13997,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9339,9 +14053,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 +14062,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 +14070,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 +14078,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 +14088,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -9450,39 +14161,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 +14269,41 @@ 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 deepCopy() { + return new drop_table_args(this); + } + + @Deprecated public drop_table_args clone() { 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 +14316,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 +14339,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 +14390,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -9598,39 +14398,47 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -9681,6 +14489,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9690,38 +14536,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 +14619,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 +14730,21 @@ public class ThriftHiveMetastore { } } - @Override + public drop_table_result deepCopy() { + return new drop_table_result(this); + } + + @Deprecated public drop_table_result clone() { return new drop_table_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o3 = null; + } + public NoSuchObjectException getO1() { return this.o1; } @@ -9847,11 +14757,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 +14780,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 +14809,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case O1: return isSetO1(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -9956,6 +14886,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -9965,9 +14924,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 +14933,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 +14943,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10036,33 +14992,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 +15103,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_tables_args deepCopy() { + return new get_tables_args(this); + } + + @Deprecated public get_tables_args clone() { 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 +15130,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 +15153,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 +15182,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DB_NAME: return isSetDb_name(); case PATTERN: return isSetPattern(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -10216,6 +15259,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10225,16 +15297,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 +15314,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10296,34 +15365,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 +15481,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_tables_result deepCopy() { + return new get_tables_result(this); + } + + @Deprecated public get_tables_result clone() { 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 +15523,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 +15546,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 +15575,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -10491,8 +15647,37 @@ public class ThriftHiveMetastore { return true; } - @Override - public int hashCode() { + @Override + public int hashCode() { + 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; } @@ -10505,9 +15690,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 +15708,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 +15718,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10550,7 +15732,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 +15774,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 +15873,20 @@ public class ThriftHiveMetastore { } } - @Override + public get_all_tables_args deepCopy() { + return new get_all_tables_args(this); + } + + @Deprecated public get_all_tables_args clone() { 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 +15899,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 +15920,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DB_NAME: return isSetDb_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -10722,6 +15983,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10731,9 +16012,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 +16022,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -10782,34 +16060,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 +16176,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_all_tables_result deepCopy() { + return new get_all_tables_result(this); + } + + @Deprecated public get_all_tables_result clone() { 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 +16218,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 +16241,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 +16270,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -10982,6 +16347,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -10991,9 +16385,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 +16403,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 +16413,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11036,7 +16427,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(); @@ -11077,33 +16469,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_table_args implements TBase, java.io.Serializable, Cloneable { + 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; - public static final int DBNAME = 1; private String tbl_name; - public static final int TBL_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 { + 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); + } + + 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, - 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 +16580,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_table_args deepCopy() { + return new get_table_args(this); + } + + @Deprecated public get_table_args clone() { 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 +16607,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 +16630,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 +16659,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DBNAME: return isSetDbname(); case TBL_NAME: return isSetTbl_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -11257,6 +16736,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11266,16 +16774,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 +16791,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11337,38 +16842,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 +16965,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_table_result deepCopy() { + return new get_table_result(this); + } + + @Deprecated public get_table_result clone() { 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 +16993,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 +17016,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 +17039,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 +17076,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -11499,23 +17094,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -11558,11 +17159,49 @@ public class ThriftHiveMetastore { return false; } - return true; - } + return true; + } + + @Override + public int hashCode() { + 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; - @Override - public int hashCode() { + 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; } @@ -11575,9 +17214,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 +17223,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 +17231,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 +17241,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11666,38 +17302,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 +17425,22 @@ public class ThriftHiveMetastore { } } - @Override + public alter_table_args deepCopy() { + return new alter_table_args(this); + } + + @Deprecated public alter_table_args clone() { 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 +17453,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 +17476,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 +17499,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 +17536,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DBNAME: return getDbname(); @@ -11828,23 +17554,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -11895,6 +17627,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -11904,23 +17674,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 +17699,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -11996,33 +17763,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 +17874,21 @@ public class ThriftHiveMetastore { } } - @Override + public alter_table_result deepCopy() { + return new alter_table_result(this); + } + + @Deprecated public alter_table_result clone() { return new alter_table_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + public InvalidOperationException getO1() { return this.o1; } @@ -12067,11 +17901,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 +17924,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 +17953,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -12176,6 +18030,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12185,9 +18068,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 +18077,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 +18087,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12256,28 +18136,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 add_partition_args implements TBase, java.io.Serializable, Cloneable { + 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; - public static final int NEW_PART = 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 { + 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; + } + + /** + * 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_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 +18235,20 @@ public class ThriftHiveMetastore { } } - @Override + public add_partition_args deepCopy() { + return new add_partition_args(this); + } + + @Deprecated public add_partition_args clone() { return new add_partition_args(this); } + @Override + public void clear() { + this.new_part = null; + } + public Partition getNew_part() { return this.new_part; } @@ -12317,13 +18261,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 +18282,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case NEW_PART: return isSetNew_part(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -12387,6 +18345,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12396,9 +18374,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 +18385,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12448,43 +18423,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 +18558,23 @@ public class ThriftHiveMetastore { } } - @Override + public add_partition_result deepCopy() { + return new add_partition_result(this); + } + + @Deprecated public add_partition_result clone() { 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 +18587,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 +18610,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 +18633,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 +18656,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 +18701,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -12648,14 +18722,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -12664,9 +18741,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -12726,6 +18806,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -12735,9 +18862,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 +18871,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 +18879,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 +18887,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 +18897,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -12846,39 +18970,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 +19098,22 @@ public class ThriftHiveMetastore { } } - @Override + public append_partition_args deepCopy() { + return new append_partition_args(this); + } + + @Deprecated public append_partition_args clone() { 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 +19126,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 +19149,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 +19187,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 +19224,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -13028,23 +19242,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -13095,6 +19315,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13104,23 +19362,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 +19396,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13166,7 +19421,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 +19467,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 +19602,23 @@ public class ThriftHiveMetastore { } } - @Override + public append_partition_result deepCopy() { + return new append_partition_result(this); + } + + @Deprecated public append_partition_result clone() { 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 +19631,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 +19654,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 +19677,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 +19700,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 +19745,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -13411,14 +19766,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -13427,9 +19785,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -13489,6 +19850,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13498,9 +19906,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 +19915,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 +19923,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 +19931,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 +19941,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13609,38 +20014,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 append_partition_by_name_args implements TBase, java.io.Serializable, Cloneable { + 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; - 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 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_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; + } + + 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 +20137,22 @@ public class ThriftHiveMetastore { } } - @Override + public append_partition_by_name_args deepCopy() { + return new append_partition_by_name_args(this); + } + + @Deprecated public append_partition_by_name_args clone() { 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 +20165,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 +20188,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 +20211,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 +20248,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -13771,23 +20266,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -13838,6 +20339,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -13847,23 +20386,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 +20410,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -13938,43 +20474,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 +20609,23 @@ public class ThriftHiveMetastore { } } - @Override + public append_partition_by_name_result deepCopy() { + return new append_partition_by_name_result(this); + } + + @Deprecated public append_partition_by_name_result clone() { 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 +20638,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 +20661,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 +20684,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 +20707,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 +20752,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -14138,14 +20773,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -14154,9 +20792,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -14216,6 +20857,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14225,9 +20913,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 +20922,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 +20930,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 +20938,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 +20948,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -14336,45 +21021,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 +21139,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 +21161,27 @@ public class ThriftHiveMetastore { } this.part_vals = __this__part_vals; } - __isset.deleteData = other.__isset.deleteData; this.deleteData = other.deleteData; } - @Override + public drop_partition_args deepCopy() { + return new drop_partition_args(this); + } + + @Deprecated public drop_partition_args clone() { 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 +21194,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 +21217,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 +21255,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 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 DB_NAME: if (value == null) { unsetDb_name(); @@ -14531,7 +21314,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -14539,13 +21322,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -14555,28 +21340,34 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -14636,6 +21427,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -14645,23 +21483,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 +21515,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 +21550,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 +21603,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 +21709,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -14822,7 +21718,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 +21729,43 @@ public class ThriftHiveMetastore { } } - @Override + public drop_partition_result deepCopy() { + return new drop_partition_result(this); + } + + @Deprecated public drop_partition_result clone() { 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 +21780,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 +21803,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 +21840,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -14931,23 +21858,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -14998,6 +21931,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15007,17 +21978,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 +21995,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 +22005,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -15094,44 +22062,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 +22179,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 +22197,27 @@ 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 deepCopy() { + return new drop_partition_by_name_args(this); + } + + @Deprecated public drop_partition_by_name_args clone() { 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 +22230,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 +22253,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 +22276,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 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 DB_NAME: if (value == null) { unsetDb_name(); @@ -15269,7 +22335,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -15277,13 +22343,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -15293,28 +22361,34 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -15366,11 +22440,58 @@ public class ThriftHiveMetastore { return false; } - return true; - } + return true; + } + + @Override + public int hashCode() { + 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; - @Override - public int hashCode() { + 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; } @@ -15383,45 +22504,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 +22607,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 +22713,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -15544,7 +22722,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 +22733,43 @@ public class ThriftHiveMetastore { } } - @Override + public drop_partition_by_name_result deepCopy() { + return new drop_partition_by_name_result(this); + } + + @Deprecated public drop_partition_by_name_result clone() { 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 +22784,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 +22807,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 +22844,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -15653,23 +22862,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -15720,6 +22935,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -15729,17 +22982,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 +22999,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 +23009,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -15816,39 +23066,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 +23194,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_args deepCopy() { + return new get_partition_args(this); + } + + @Deprecated public get_partition_args clone() { 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 +23222,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 +23245,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 +23283,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 +23320,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -15998,23 +23338,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -16065,6 +23411,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16074,23 +23458,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 +23492,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16136,7 +23517,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 +23563,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 +23686,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_result deepCopy() { + return new get_partition_result(this); + } + + @Deprecated public get_partition_result clone() { 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 +23714,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 +23737,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 +23760,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 +23797,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -16343,23 +23815,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -16410,6 +23888,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16419,9 +23935,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 +23944,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 +23952,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 +23962,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16508,40 +24021,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 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; + 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; - 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); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = 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; + 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 +24146,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_by_name_args deepCopy() { + return new get_partition_by_name_args(this); + } + + @Deprecated public get_partition_by_name_args clone() { 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 +24174,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 +24197,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 +24220,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 +24257,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -16672,23 +24275,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -16739,6 +24348,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -16748,23 +24395,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 +24419,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -16839,38 +24483,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 +24606,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_by_name_result deepCopy() { + return new get_partition_by_name_result(this); + } + + @Deprecated public get_partition_by_name_result clone() { 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 +24634,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 +24657,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 +24680,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 +24717,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -17001,23 +24735,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -17068,6 +24808,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17077,9 +24855,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 +24864,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 +24872,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 +24882,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -17168,39 +24943,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 +25053,41 @@ 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 deepCopy() { + return new get_partitions_args(this); + } + + @Deprecated public get_partitions_args clone() { 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 +25100,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 +25123,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 +25182,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -17334,23 +25200,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -17401,6 +25273,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17410,38 +25320,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 +25403,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 +25531,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partitions_result deepCopy() { + return new get_partitions_result(this); + } + + @Deprecated public get_partitions_result clone() { 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 +25574,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 +25597,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 +25620,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 +25657,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); - } + } + } + + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -17678,23 +25675,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -17745,6 +25748,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -17754,9 +25795,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 +25814,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 +25822,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 +25832,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -17808,7 +25846,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 +25900,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 { + 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; - 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_partition_names_args.class, metaDataMap); } @@ -17911,28 +26010,41 @@ 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 deepCopy() { + return new get_partition_names_args(this); + } + + @Deprecated public get_partition_names_args clone() { 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 +26057,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 +26080,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 +26139,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -18027,23 +26157,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -18094,6 +26230,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18103,38 +26277,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 +26360,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 +26476,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_names_result deepCopy() { + return new get_partition_names_result(this); + } + + @Deprecated public get_partition_names_result clone() { 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 +26518,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 +26541,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 +26570,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -18389,6 +26647,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18398,9 +26685,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 +26703,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 +26713,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -18443,7 +26727,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 +26769,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 +26889,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 +26911,27 @@ 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 deepCopy() { + return new get_partitions_ps_args(this); + } + + @Deprecated public get_partitions_ps_args clone() { 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 +26944,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 +26967,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 +27005,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 +27072,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -18708,14 +27093,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: @@ -18724,9 +27112,12 @@ public class ThriftHiveMetastore { return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -18786,6 +27177,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -18795,23 +27233,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 +27265,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 +27300,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 +27353,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 { + 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; + 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; - 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); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - private List success; - public static final int SUCCESS = 0; - private MetaException o1; - public static final int O1 = 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(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 +27469,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_partitions_ps_result deepCopy() { + return new get_partitions_ps_result(this); + } + + @Deprecated public get_partitions_ps_result clone() { 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 +27511,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 +27534,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 +27563,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -19117,6 +27640,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19126,9 +27678,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 +27697,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 +27707,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -19172,7 +27721,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 +27763,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 +27883,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,15 +27905,27 @@ 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 deepCopy() { + return new get_partition_names_ps_args(this); + } + + @Deprecated public get_partition_names_ps_args clone() { 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() { return this.db_name; } @@ -19312,11 +27938,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 +27961,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 +27999,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(); @@ -19418,13 +28066,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -19437,14 +28087,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: @@ -19453,9 +28106,12 @@ public class ThriftHiveMetastore { return isSetPart_vals(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -19515,6 +28171,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19524,23 +28227,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 +28259,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 +28294,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 +28347,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 +28463,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_partition_names_ps_result deepCopy() { + return new get_partition_names_ps_result(this); + } + + @Deprecated public get_partition_names_ps_result clone() { 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 +28505,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 +28528,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 +28557,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -19846,6 +28634,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -19855,9 +28672,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 +28690,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 +28700,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -19900,7 +28714,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 +28756,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 +28875,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 +28893,27 @@ 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 deepCopy() { + return new get_partitions_by_filter_args(this); + } + + @Deprecated public get_partitions_by_filter_args clone() { 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 +28926,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 +28949,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 +28972,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 +29039,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -20145,14 +29060,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case DB_NAME: return isSetDb_name(); case TBL_NAME: @@ -20161,9 +29079,12 @@ public class ThriftHiveMetastore { return isSetFilter(); case MAX_PARTS: return isSetMax_parts(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -20223,6 +29144,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20232,45 +29200,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 +29303,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 +29431,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_partitions_by_filter_result deepCopy() { + return new get_partitions_by_filter_result(this); + } + + @Deprecated public get_partitions_by_filter_result clone() { 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 +29474,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 +29497,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 +29520,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 +29557,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -20520,23 +29575,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -20587,6 +29648,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20596,9 +29695,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 +29714,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 +29722,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 +29732,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -20650,7 +29746,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 +29800,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 +29923,22 @@ public class ThriftHiveMetastore { } } - @Override + public alter_partition_args deepCopy() { + return new alter_partition_args(this); + } + + @Deprecated public alter_partition_args clone() { 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 +29951,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 +29974,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 +29997,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 +30034,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -20865,23 +30052,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -20932,6 +30125,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -20941,23 +30172,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 +30197,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21033,33 +30261,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 +30372,21 @@ public class ThriftHiveMetastore { } } - @Override + public alter_partition_result deepCopy() { + return new alter_partition_result(this); + } + + @Deprecated public alter_partition_result clone() { return new alter_partition_result(this); } + @Override + public void clear() { + this.o1 = null; + this.o2 = null; + } + public InvalidOperationException getO1() { return this.o1; } @@ -21104,11 +30399,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 +30422,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 +30451,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case O1: return isSetO1(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -21213,6 +30528,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21222,9 +30566,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 +30575,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 +30585,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21293,33 +30634,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 +30745,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_config_value_args deepCopy() { + return new get_config_value_args(this); + } + + @Deprecated public get_config_value_args clone() { 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 +30772,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 +30795,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 +30816,7 @@ public class ThriftHiveMetastore { } break; - case DEFAULTVALUE: + case DEFAULT_VALUE: if (value == null) { unsetDefaultValue(); } else { @@ -21404,34 +30824,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -21473,6 +30901,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21482,16 +30939,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 +30956,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21553,33 +31007,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 +31118,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_config_value_result deepCopy() { + return new get_config_value_result(this); + } + + @Deprecated public get_config_value_result clone() { 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 +31145,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 +31168,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 +31197,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -21733,6 +31274,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21742,16 +31312,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 +31330,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -21812,28 +31379,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 +31478,20 @@ public class ThriftHiveMetastore { } } - @Override + public partition_name_to_vals_args deepCopy() { + return new partition_name_to_vals_args(this); + } + + @Deprecated public partition_name_to_vals_args clone() { 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 +31504,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 +31525,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -21943,6 +31588,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -21952,9 +31617,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 +31627,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22003,34 +31665,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 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(partition_name_to_vals_result.class, metaDataMap); } @@ -22062,11 +31781,21 @@ public class ThriftHiveMetastore { } } - @Override + public partition_name_to_vals_result deepCopy() { + return new partition_name_to_vals_result(this); + } + + @Deprecated public partition_name_to_vals_result clone() { 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 +31823,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 +31846,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 +31875,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -22203,6 +31952,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22212,9 +31990,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 +32008,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 +32018,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22257,7 +32032,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 +32074,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 +32173,20 @@ public class ThriftHiveMetastore { } } - @Override + public partition_name_to_spec_args deepCopy() { + return new partition_name_to_spec_args(this); + } + + @Deprecated public partition_name_to_spec_args clone() { 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 +32199,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 +32220,37 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case PART_NAME: return isSetPart_name(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -22424,8 +32278,28 @@ public class ThriftHiveMetastore { return true; } - @Override - public int hashCode() { + @Override + public int hashCode() { + 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; } @@ -22438,9 +32312,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 +32322,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22489,35 +32360,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 +32485,21 @@ public class ThriftHiveMetastore { } } - @Override + public partition_name_to_spec_result deepCopy() { + return new partition_name_to_spec_result(this); + } + + @Deprecated public partition_name_to_spec_result clone() { 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 +32523,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 +32546,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 +32575,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: return isSetO1(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -22694,6 +32652,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22703,9 +32690,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 +32710,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 +32720,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -22750,7 +32734,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 +32777,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 +32888,21 @@ public class ThriftHiveMetastore { } } - @Override + public add_index_args deepCopy() { + return new add_index_args(this); + } + + @Deprecated public add_index_args clone() { 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 +32915,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 +32938,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 +32967,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -22972,6 +33044,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -22981,9 +33082,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 +33091,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 +33101,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -23054,43 +33152,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 +33287,23 @@ public class ThriftHiveMetastore { } } - @Override + public add_index_result deepCopy() { + return new add_index_result(this); + } + + @Deprecated public add_index_result clone() { 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 +33316,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 +33339,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 +33362,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 +33385,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 +33430,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -23254,14 +33451,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O1: @@ -23270,9 +33470,12 @@ public class ThriftHiveMetastore { return isSetO2(); case O3: return isSetO3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -23332,6 +33535,53 @@ public class ThriftHiveMetastore { 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; + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -23341,9 +33591,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 +33600,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 +33608,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 +33616,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 +33626,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -23452,44 +33699,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 +33816,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 +33834,27 @@ 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 deepCopy() { + return new drop_index_by_name_args(this); + } + + @Deprecated public drop_index_by_name_args clone() { 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 +33867,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 +33890,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 +33913,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 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 DB_NAME: if (value == null) { unsetDb_name(); @@ -23627,7 +33972,7 @@ public class ThriftHiveMetastore { } break; - case DELETEDATA: + case DELETE_DATA: if (value == null) { unsetDeleteData(); } else { @@ -23635,13 +33980,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -23651,28 +33998,34 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -23732,6 +34085,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -23741,45 +34141,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 +34244,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 +34350,7 @@ public class ThriftHiveMetastore { { this(); this.success = success; - this.__isset.success = true; + setSuccessIsSet(true); this.o1 = o1; this.o2 = o2; } @@ -23902,7 +34359,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 +34370,43 @@ public class ThriftHiveMetastore { } } - @Override + public drop_index_by_name_result deepCopy() { + return new drop_index_by_name_result(this); + } + + @Deprecated public drop_index_by_name_result clone() { 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 +34421,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 +34444,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 +34481,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return new Boolean(isSuccess()); @@ -24011,23 +34499,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -24078,6 +34572,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24087,17 +34619,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 +34636,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 +34646,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24174,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_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 +34826,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_index_by_name_args deepCopy() { + return new get_index_by_name_args(this); + } + + @Deprecated public get_index_by_name_args clone() { 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 +34854,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 +34877,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 +34900,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 +34937,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -24336,23 +34955,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -24403,6 +35028,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24412,23 +35075,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 +35099,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24503,38 +35163,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 +35286,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_index_by_name_result deepCopy() { + return new get_index_by_name_result(this); + } + + @Deprecated public get_index_by_name_result clone() { 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 +35314,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 +35337,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 +35360,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 +35397,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -24665,23 +35415,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -24732,6 +35488,44 @@ public class ThriftHiveMetastore { 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; + } + public void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -24741,9 +35535,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 +35544,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 +35552,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 +35562,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -24832,39 +35623,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 +35733,41 @@ 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 deepCopy() { + return new get_indexes_args(this); + } + + @Deprecated public get_indexes_args clone() { 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 +35780,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 +35803,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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -24982,13 +35862,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -24998,23 +35880,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -25065,6 +35953,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25074,38 +36000,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 +36083,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 +36211,22 @@ public class ThriftHiveMetastore { } } - @Override + public get_indexes_result deepCopy() { + return new get_indexes_result(this); + } + + @Deprecated public get_indexes_result clone() { 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 +36254,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 +36277,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 +36300,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 +36337,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case SUCCESS: return getSuccess(); @@ -25342,23 +36355,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -25409,6 +36428,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25418,9 +36475,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 +36494,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 +36502,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 +36512,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -25472,7 +36526,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 +36580,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 +36690,41 @@ 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 deepCopy() { + return new get_index_names_args(this); + } + + @Deprecated public get_index_names_args clone() { 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 +36737,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 +36760,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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setMax_indexesIsSet(boolean value) { + __isset_bit_vector.set(__MAX_INDEXES_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case DB_NAME: if (value == null) { unsetDb_name(); @@ -25675,13 +36819,15 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case DB_NAME: return getDb_name(); @@ -25691,23 +36837,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -25758,6 +36910,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -25767,38 +36957,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 +37040,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 +37156,21 @@ public class ThriftHiveMetastore { } } - @Override + public get_index_names_result deepCopy() { + return new get_index_names_result(this); + } + + @Deprecated public get_index_names_result clone() { 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 +37198,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 +37221,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 +37250,42 @@ public class ThriftHiveMetastore { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case O2: return isSetO2(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -26053,6 +37327,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -26062,9 +37365,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 +37383,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 +37393,10 @@ public class ThriftHiveMetastore { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -26107,7 +37407,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 +37449,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..690a25b 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,23 @@ public class Type implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Type deepCopy() { + return new Type(this); + } + + @Deprecated public Type clone() { 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 +185,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 +208,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 +231,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 +269,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 +314,15 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case NAME: return getName(); @@ -233,14 +335,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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case NAME: return isSetName(); case TYPE1: @@ -249,9 +354,12 @@ 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -311,6 +419,53 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -320,30 +475,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 +517,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 +552,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 +613,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..0bce364 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,20 @@ public class UnknownDBException extends Exception implements TBase, java.io.Seri } } - @Override + public UnknownDBException deepCopy() { + return new UnknownDBException(this); + } + + @Deprecated public UnknownDBException clone() { return new UnknownDBException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..c3fd6f7 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,20 @@ public class UnknownTableException extends Exception implements TBase, java.io.S } } - @Override + public UnknownTableException deepCopy() { + return new UnknownTableException(this); + } + + @Deprecated public UnknownTableException clone() { return new UnknownTableException(this); } + @Override + public void clear() { + this.message = null; + } + public String getMessage() { return this.message; } @@ -74,13 +147,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 +168,37 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MESSAGE: return isSetMessage(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -144,6 +231,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -153,9 +260,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 +270,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 +308,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..6d3ab5b 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,21 @@ public class Version implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Version deepCopy() { + return new Version(this); + } + + @Deprecated public Version clone() { return new Version(this); } + @Override + public void clear() { + this.version = null; + this.comments = null; + } + public String getVersion() { return this.version; } @@ -84,11 +160,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 +183,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 +212,42 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case VERSION: return isSetVersion(); case COMMENTS: return isSetComments(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -193,6 +289,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -202,16 +327,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 +344,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 +395,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 diff --git metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java index dab3c42..9c409a9 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 8d8ca40..2a09893 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java @@ -444,7 +444,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 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..ca436eb 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; + } + + /** + * 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 boolean adjacencyType = false; + 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,27 @@ 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 deepCopy() { + return new Adjacency(this); + } + + @Deprecated public Adjacency clone() { 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 +182,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 +220,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 +280,55 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -247,12 +362,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 +379,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -273,16 +426,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 +451,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 +480,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 +519,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 +531,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..9245d17 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,51 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Graph deepCopy() { + return new Graph(this); + } + + @Deprecated public Graph clone() { 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 +233,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 +271,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 +300,7 @@ public class Graph implements TBase, java.io.Serializable, Cloneable { } break; - case ADJACENCYLIST: + case ADJACENCY_LIST: if (value == null) { unsetAdjacencyList(); } else { @@ -201,39 +308,47 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -249,12 +364,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 +399,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -293,17 +446,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 +471,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 +491,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 +502,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 +523,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 +541,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 +569,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..4532b1a 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,31 @@ 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 deepCopy() { + return new Operator(this); + } + + @Deprecated public Operator clone() { 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 +249,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 +314,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 +348,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 +387,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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case OPERATORID: + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case OPERATOR_ID: if (value == null) { unsetOperatorId(); } else { @@ -280,15 +413,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 +429,7 @@ public class Operator implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORCOUNTERS: + case OPERATOR_COUNTERS: if (value == null) { unsetOperatorCounters(); } else { @@ -320,23 +453,25 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +480,35 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -392,12 +533,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 +586,71 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -454,24 +660,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 +694,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 +713,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 +747,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 +769,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 +802,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 +838,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 ccaa4c5..13869c5 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,65 +6,81 @@ 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 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 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); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - JOIN, - MAPJOIN, - EXTRACT, - FILTER, - FORWARD, - GROUPBY, - LIMIT, - SCRIPT, - SELECT, - TABLESCAN, - FILESINK, - REDUCESINK, - UNION, - UDTF, - LATERALVIEWJOIN, - LATERALVIEWFORWARD ); + private final int 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"); - }}; + private OperatorType(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 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; + 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..f3b83e9 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,33 @@ 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 deepCopy() { + return new Query(this); + } + + @Deprecated public Query clone() { 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 +276,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 +299,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 +333,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 +367,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 +390,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 +428,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 +467,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 +493,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYTYPE: + case QUERY_TYPE: if (value == null) { unsetQueryType(); } else { @@ -360,7 +501,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYATTRIBUTES: + case QUERY_ATTRIBUTES: if (value == null) { unsetQueryAttributes(); } else { @@ -368,7 +509,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case QUERYCOUNTERS: + case QUERY_COUNTERS: if (value == null) { unsetQueryCounters(); } else { @@ -376,7 +517,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case STAGEGRAPH: + case STAGE_GRAPH: if (value == null) { unsetStageGraph(); } else { @@ -384,7 +525,7 @@ public class Query implements TBase, java.io.Serializable, Cloneable { } break; - case STAGELIST: + case STAGE_LIST: if (value == null) { unsetStageList(); } else { @@ -408,29 +549,31 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +582,39 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -561,6 +710,89 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -570,23 +802,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 +836,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 +855,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 +863,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 +881,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 +924,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 +937,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 +955,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 +1039,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..1f6546a 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,28 @@ 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 deepCopy() { + return new QueryPlan(this); + } + + @Deprecated public QueryPlan clone() { 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 +198,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 +237,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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { case QUERIES: if (value == null) { unsetQueries(); @@ -183,13 +279,15 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case QUERIES: return getQueries(); @@ -199,23 +297,29 @@ 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -266,6 +370,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -275,9 +417,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 +436,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 +469,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 +513,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..168943b 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,32 @@ 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 deepCopy() { + return new Stage(this); + } + + @Deprecated public Stage clone() { 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 +267,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 +332,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 +366,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 +404,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 +443,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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case STAGEID: + public void setStartedIsSet(boolean value) { + __isset_bit_vector.set(__STARTED_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case STAGE_ID: if (value == null) { unsetStageId(); } else { @@ -327,15 +469,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 +485,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - case STAGECOUNTERS: + case STAGE_COUNTERS: if (value == null) { unsetStageCounters(); } else { @@ -351,7 +493,7 @@ public class Stage implements TBase, java.io.Serializable, Cloneable { } break; - case TASKLIST: + case TASK_LIST: if (value == null) { unsetTaskList(); } else { @@ -375,26 +517,28 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +547,37 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -452,12 +602,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 +664,80 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -523,24 +747,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 +781,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 +800,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 +818,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 +852,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 +874,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 +887,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 +919,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 +963,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 69bc336..0f2afe0 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,44 +6,60 @@ 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 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 enum StageType implements TEnum { + CONDITIONAL(0), + COPY(1), + DDL(2), + MAPRED(3), + EXPLAIN(4), + FETCH(5), + FUNC(6), + MAPREDLOCAL(7), + MOVE(8); - public static final IntRangeSet VALID_VALUES = new IntRangeSet( - CONDITIONAL, - COPY, - DDL, - MAPRED, - EXPLAIN, - FETCH, - FUNC, - MAPREDLOCAL, - MOVE ); + private final int 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"); - }}; + private StageType(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 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; + 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..326ce1c 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,33 @@ 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 deepCopy() { + return new Task(this); + } + + @Deprecated public Task clone() { 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 +276,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 +341,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 +375,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 +398,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 +436,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 +475,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 +501,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 +517,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case TASKCOUNTERS: + case TASK_COUNTERS: if (value == null) { unsetTaskCounters(); } else { @@ -378,7 +525,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORGRAPH: + case OPERATOR_GRAPH: if (value == null) { unsetOperatorGraph(); } else { @@ -386,7 +533,7 @@ public class Task implements TBase, java.io.Serializable, Cloneable { } break; - case OPERATORLIST: + case OPERATOR_LIST: if (value == null) { unsetOperatorList(); } else { @@ -410,29 +557,31 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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 +590,39 @@ 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -492,12 +647,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 +718,89 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -572,24 +810,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 +844,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 +863,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 +871,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 +889,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 +923,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 +945,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 +966,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 +999,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 +1055,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..3a56a99 --- /dev/null +++ ql/src/gen-php/queryplan/queryplan_types.php @@ -0,0 +1,1744 @@ + 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-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..63cf00e 100644 --- ql/src/gen-py/queryplan/ttypes.py +++ ql/src/gen-py/queryplan/ttypes.py @@ -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 @@ -40,11 +60,61 @@ class OperatorType: LATERALVIEWJOIN = 14 LATERALVIEWFORWARD = 15 + _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", + } + + _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, + } + 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 @@ -56,6 +126,30 @@ class StageType: MAPREDLOCAL = 7 MOVE = 8 + _VALUES_TO_NAMES = { + 0: "CONDITIONAL", + 1: "COPY", + 2: "DDL", + 3: "MAPRED", + 4: "EXPLAIN", + 5: "FETCH", + 6: "FUNC", + 7: "MAPREDLOCAL", + 8: "MOVE", + } + + _NAMES_TO_VALUES = { + "CONDITIONAL": 0, + "COPY": 1, + "DDL": 2, + "MAPRED": 3, + "EXPLAIN": 4, + "FETCH": 5, + "FUNC": 6, + "MAPREDLOCAL": 7, + "MOVE": 8, + } + class Adjacency: """ Attributes: 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 f65c595..635cff1 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/AbstractMapJoinOperator.java @@ -127,7 +127,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 7fc9fb5..db93248 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ConditionalTask.java @@ -174,7 +174,7 @@ public class ConditionalTask extends Task implements } @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 fbcdd9c..7f5ccb2 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/DDLTask.java @@ -2512,7 +2512,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 b5cd1ef..afca087 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExecDriver.java @@ -1230,7 +1230,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 0a22289..686e3fd 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ExplainTask.java @@ -395,7 +395,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 f28e4a6..a1c1ee0 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FetchTask.java @@ -140,7 +140,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 ebbbe0a..8d447f6 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/FileSinkOperator.java @@ -749,7 +749,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 6305ee6..1008cf2 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java @@ -945,7 +945,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/JoinOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java index 6392e68..efcf776 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/JoinOperator.java @@ -131,7 +131,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 022769c..495e07c 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapJoinOperator.java @@ -335,7 +335,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 fefe42d..8889138 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MapRedTask.java @@ -375,4 +375,9 @@ 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/MoveTask.java ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java index 1c15db2..242bc38 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/MoveTask.java @@ -268,7 +268,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 4260370..08dca7b 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java @@ -31,6 +31,7 @@ import org.apache.commons.logging.LogFactory; 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.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; @@ -1134,7 +1135,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 ed2c005..0941933 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java @@ -239,7 +239,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 dd2cc62..1a78e6e 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/SMBMapJoinOperator.java @@ -582,7 +582,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/TableScanOperator.java ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java index 376c1e9..fc57d00 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/TableScanOperator.java @@ -71,7 +71,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 8b75d2c..92edae5 100644 --- ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Task.java @@ -33,6 +33,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; @@ -283,9 +284,9 @@ public abstract class Task implements Serializable, * * @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/IndexMetadataChangeTask.java ql/src/java/org/apache/hadoop/hive/ql/index/compact/IndexMetadataChangeTask.java index 4e4f834..e09ab48 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 @@ -95,7 +95,7 @@ public class IndexMetadataChangeTask extends Task{ } @Override - public int getType() { + public StageType getType() { return StageType.DDL; } diff --git serde/src/gen-cpp/serde_constants.cpp serde/src/gen-cpp/serde_constants.cpp index 07cdb6f..da76691 100644 --- serde/src/gen-cpp/serde_constants.cpp +++ serde/src/gen-cpp/serde_constants.cpp @@ -24,6 +24,8 @@ serdeConstants::serdeConstants() { SERIALIZATION_SORT_ORDER = "serialization.sort.order"; + SERIALIZATION_USE_JSON_OBJECTS = "serialization.use.json.object"; + FIELD_DELIM = "field.delim"; COLLECTION_DELIM = "colelction.delim"; diff --git serde/src/gen-cpp/serde_constants.h serde/src/gen-cpp/serde_constants.h index 8aba111..d00d7a5 100644 --- serde/src/gen-cpp/serde_constants.h +++ serde/src/gen-cpp/serde_constants.h @@ -21,6 +21,7 @@ class serdeConstants { std::string SERIALIZATION_NULL_FORMAT; std::string SERIALIZATION_LAST_COLUMN_TAKES_REST; std::string SERIALIZATION_SORT_ORDER; + std::string SERIALIZATION_USE_JSON_OBJECTS; std::string FIELD_DELIM; std::string COLLECTION_DELIM; std::string LINE_DELIM; diff --git serde/src/gen-cpp/serde_types.h serde/src/gen-cpp/serde_types.h index 127ad8e..8a9d46c 100644 --- serde/src/gen-cpp/serde_types.h +++ serde/src/gen-cpp/serde_types.h @@ -7,6 +7,7 @@ #define serde_TYPES_H #include +#include #include #include diff --git serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java index 27bf5fa..eb11e81 100644 --- serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java +++ serde/src/gen-java/org/apache/hadoop/hive/serde/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 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 index 325f30a..bb8b044 100644 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java +++ serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java @@ -9,33 +9,98 @@ 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 InnerStruct implements TBase, java.io.Serializable, Cloneable { +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; + /** 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD0, new FieldMetaData("field0", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - }}); + // 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); } @@ -47,46 +112,58 @@ public class InnerStruct implements TBase, java.io.Serializable, Cloneable { { this(); this.field0 = field0; - this.__isset.field0 = true; + setField0IsSet(true); } /** * Performs a deep copy on other. */ public InnerStruct(InnerStruct other) { - __isset.field0 = other.__isset.field0; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.field0 = other.field0; } - @Override + public InnerStruct deepCopy() { + return new InnerStruct(this); + } + + @Deprecated public InnerStruct clone() { return new InnerStruct(this); } + @Override + public void clear() { + setField0IsSet(false); + this.field0 = 0; + } + public int getField0() { return this.field0; } - public void setField0(int field0) { + public InnerStruct setField0(int field0) { this.field0 = field0; - this.__isset.field0 = true; + setField0IsSet(true); + return this; } public void unsetField0() { - this.__isset.field0 = false; + __isset_bit_vector.clear(__FIELD0_ISSET_ID); } - // Returns true if field field0 is set (has been asigned a value) and false otherwise + /** Returns true if field field0 is set (has been asigned a value) and false otherwise */ public boolean isSetField0() { - return this.__isset.field0; + return __isset_bit_vector.get(__FIELD0_ISSET_ID); } public void setField0IsSet(boolean value) { - this.__isset.field0 = value; + __isset_bit_vector.set(__FIELD0_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case FIELD0: if (value == null) { unsetField0(); @@ -95,29 +172,37 @@ public class InnerStruct implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case FIELD0: return new Integer(getField0()); - 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case FIELD0: return isSetField0(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -150,6 +235,26 @@ public class InnerStruct implements TBase, java.io.Serializable, Cloneable { 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -159,25 +264,22 @@ public class InnerStruct implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case FIELD0: + switch (field.id) { + case 1: // FIELD0 if (field.type == TType.I32) { this.field0 = iprot.readI32(); - this.__isset.field0 = true; + setField0IsSet(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(); } @@ -207,7 +309,6 @@ public class InnerStruct 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 serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java index 3f4efbe..d3677c0 100644 --- serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java +++ serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java @@ -9,44 +9,113 @@ 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 ThriftTestObj implements TBase, java.io.Serializable, Cloneable { +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; + /** 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, + // 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))); - put(FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, InnerStruct.class)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); } @@ -60,7 +129,7 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { { this(); this.field1 = field1; - this.__isset.field1 = true; + setField1IsSet(true); this.field2 = field2; this.field3 = field3; } @@ -69,7 +138,8 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { * Performs a deep copy on other. */ public ThriftTestObj(ThriftTestObj other) { - __isset.field1 = other.__isset.field1; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.field1 = other.field1; if (other.isSetField2()) { this.field2 = other.field2; @@ -83,46 +153,60 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { } } - @Override + public ThriftTestObj deepCopy() { + return new ThriftTestObj(this); + } + + @Deprecated public ThriftTestObj clone() { 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) { + public ThriftTestObj setField1(int field1) { this.field1 = field1; - this.__isset.field1 = true; + setField1IsSet(true); + return this; } public void unsetField1() { - this.__isset.field1 = false; + __isset_bit_vector.clear(__FIELD1_ISSET_ID); } - // Returns true if field field1 is set (has been asigned a value) and false otherwise + /** Returns true if field field1 is set (has been asigned a value) and false otherwise */ public boolean isSetField1() { - return this.__isset.field1; + return __isset_bit_vector.get(__FIELD1_ISSET_ID); } public void setField1IsSet(boolean value) { - this.__isset.field1 = value; + __isset_bit_vector.set(__FIELD1_ISSET_ID, value); } public String getField2() { return this.field2; } - public void setField2(String field2) { + public ThriftTestObj setField2(String field2) { this.field2 = field2; + return this; } public void unsetField2() { this.field2 = null; } - // Returns true if field field2 is set (has been asigned a value) and false otherwise + /** Returns true if field field2 is set (has been asigned a value) and false otherwise */ public boolean isSetField2() { return this.field2 != null; } @@ -152,15 +236,16 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { return this.field3; } - public void setField3(List field3) { + public ThriftTestObj setField3(List field3) { this.field3 = field3; + return this; } public void unsetField3() { this.field3 = null; } - // Returns true if field field3 is set (has been asigned a value) and false otherwise + /** Returns true if field field3 is set (has been asigned a value) and false otherwise */ public boolean isSetField3() { return this.field3 != null; } @@ -171,8 +256,8 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { } } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case FIELD1: if (value == null) { unsetField1(); @@ -197,13 +282,15 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case FIELD1: return new Integer(getField1()); @@ -213,23 +300,29 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { case FIELD3: return getField3(); - 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case FIELD1: return isSetField1(); case FIELD2: return isSetField2(); case FIELD3: return isSetField3(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -280,6 +373,44 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -289,24 +420,23 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case FIELD1: + switch (field.id) { + case 1: // FIELD1 if (field.type == TType.I32) { this.field1 = iprot.readI32(); - this.__isset.field1 = true; + setField1IsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case FIELD2: + case 2: // FIELD2 if (field.type == TType.STRING) { this.field2 = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case FIELD3: + case 3: // FIELD3 if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); @@ -326,13 +456,11 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { 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(); } @@ -353,7 +481,8 @@ public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(FIELD3_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); - for (InnerStruct _iter3 : this.field3) { + for (InnerStruct _iter3 : this.field3) + { _iter3.write(oprot); } oprot.writeListEnd(); @@ -394,7 +523,6 @@ public class ThriftTestObj 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 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 index ece9305..95a2933 100644 --- 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 @@ -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 Complex implements TBase, java.io.Serializable, Cloneable { +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); @@ -28,44 +37,110 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { 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; + /** 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, + // 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))); - put(ASTRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.A_STRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.I32)))); - put(LSTRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.L_STRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new FieldValueMetaData(TType.STRING)))); - put(LINTSTRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.LINT_STRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, new ListMetaData(TType.LIST, new StructMetaData(TType.STRUCT, IntString.class)))); - put(MSTRINGSTRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.M_STRING_STRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, new MapMetaData(TType.MAP, new FieldValueMetaData(TType.STRING), new FieldValueMetaData(TType.STRING)))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); } @@ -82,7 +157,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { { this(); this.aint = aint; - this.__isset.aint = true; + setAintIsSet(true); this.aString = aString; this.lint = lint; this.lString = lString; @@ -94,7 +169,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { * Performs a deep copy on other. */ public Complex(Complex other) { - __isset.aint = other.__isset.aint; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); this.aint = other.aint; if (other.isSetAString()) { this.aString = other.aString; @@ -137,46 +213,63 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } } - @Override + public Complex deepCopy() { + return new Complex(this); + } + + @Deprecated public Complex clone() { 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) { + public Complex setAint(int aint) { this.aint = aint; - this.__isset.aint = true; + setAintIsSet(true); + return this; } public void unsetAint() { - this.__isset.aint = false; + __isset_bit_vector.clear(__AINT_ISSET_ID); } - // Returns true if field aint is set (has been asigned a value) and false otherwise + /** Returns true if field aint is set (has been asigned a value) and false otherwise */ public boolean isSetAint() { - return this.__isset.aint; + return __isset_bit_vector.get(__AINT_ISSET_ID); } public void setAintIsSet(boolean value) { - this.__isset.aint = value; + __isset_bit_vector.set(__AINT_ISSET_ID, value); } public String getAString() { return this.aString; } - public void setAString(String aString) { + public Complex setAString(String aString) { this.aString = aString; + return this; } public void unsetAString() { this.aString = null; } - // Returns true if field aString is set (has been asigned a value) and false otherwise + /** Returns true if field aString is set (has been asigned a value) and false otherwise */ public boolean isSetAString() { return this.aString != null; } @@ -206,15 +299,16 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { return this.lint; } - public void setLint(List lint) { + public Complex setLint(List lint) { this.lint = lint; + return this; } public void unsetLint() { this.lint = null; } - // Returns true if field lint is set (has been asigned a value) and false otherwise + /** Returns true if field lint is set (has been asigned a value) and false otherwise */ public boolean isSetLint() { return this.lint != null; } @@ -244,15 +338,16 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { return this.lString; } - public void setLString(List lString) { + public Complex setLString(List lString) { this.lString = lString; + return this; } public void unsetLString() { this.lString = null; } - // Returns true if field lString is set (has been asigned a value) and false otherwise + /** Returns true if field lString is set (has been asigned a value) and false otherwise */ public boolean isSetLString() { return this.lString != null; } @@ -282,15 +377,16 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { return this.lintString; } - public void setLintString(List lintString) { + public Complex setLintString(List lintString) { this.lintString = lintString; + return this; } public void unsetLintString() { this.lintString = null; } - // Returns true if field lintString is set (has been asigned a value) and false otherwise + /** Returns true if field lintString is set (has been asigned a value) and false otherwise */ public boolean isSetLintString() { return this.lintString != null; } @@ -316,15 +412,16 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { return this.mStringString; } - public void setMStringString(Map mStringString) { + public Complex setMStringString(Map mStringString) { this.mStringString = mStringString; + return this; } public void unsetMStringString() { this.mStringString = null; } - // Returns true if field mStringString is set (has been asigned a value) and false otherwise + /** Returns true if field mStringString is set (has been asigned a value) and false otherwise */ public boolean isSetMStringString() { return this.mStringString != null; } @@ -335,8 +432,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case AINT: if (value == null) { unsetAint(); @@ -345,7 +442,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } break; - case ASTRING: + case A_STRING: if (value == null) { unsetAString(); } else { @@ -361,7 +458,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } break; - case LSTRING: + case L_STRING: if (value == null) { unsetLString(); } else { @@ -369,7 +466,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } break; - case LINTSTRING: + case LINT_STRING: if (value == null) { unsetLintString(); } else { @@ -377,7 +474,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } break; - case MSTRINGSTRING: + case M_STRING_STRING: if (value == null) { unsetMStringString(); } else { @@ -385,54 +482,62 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case AINT: return new Integer(getAint()); - case ASTRING: + case A_STRING: return getAString(); case LINT: return getLint(); - case LSTRING: + case L_STRING: return getLString(); - case LINTSTRING: + case LINT_STRING: return getLintString(); - case MSTRINGSTRING: + case M_STRING_STRING: return getMStringString(); - 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case AINT: return isSetAint(); - case ASTRING: + case A_STRING: return isSetAString(); case LINT: return isSetLint(); - case LSTRING: + case L_STRING: return isSetLString(); - case LINTSTRING: + case LINT_STRING: return isSetLintString(); - case MSTRINGSTRING: + case M_STRING_STRING: return isSetMStringString(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -510,6 +615,71 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -519,24 +689,23 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case AINT: + switch (field.id) { + case 1: // AINT if (field.type == TType.I32) { this.aint = iprot.readI32(); - this.__isset.aint = true; + setAintIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case ASTRING: + case 2: // A_STRING if (field.type == TType.STRING) { this.aString = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case LINT: + case 3: // LINT if (field.type == TType.LIST) { { TList _list0 = iprot.readListBegin(); @@ -553,7 +722,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case LSTRING: + case 4: // L_STRING if (field.type == TType.LIST) { { TList _list3 = iprot.readListBegin(); @@ -570,7 +739,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case LINTSTRING: + case 5: // LINT_STRING if (field.type == TType.LIST) { { TList _list6 = iprot.readListBegin(); @@ -588,7 +757,7 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { TProtocolUtil.skip(iprot, field.type); } break; - case MSTRINGSTRING: + case 6: // M_STRING_STRING if (field.type == TType.MAP) { { TMap _map9 = iprot.readMapBegin(); @@ -609,13 +778,11 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { 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(); } @@ -636,7 +803,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(LINT_FIELD_DESC); { oprot.writeListBegin(new TList(TType.I32, this.lint.size())); - for (int _iter13 : this.lint) { + for (int _iter13 : this.lint) + { oprot.writeI32(_iter13); } oprot.writeListEnd(); @@ -647,7 +815,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(L_STRING_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRING, this.lString.size())); - for (String _iter14 : this.lString) { + for (String _iter14 : this.lString) + { oprot.writeString(_iter14); } oprot.writeListEnd(); @@ -658,7 +827,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { oprot.writeFieldBegin(LINT_STRING_FIELD_DESC); { oprot.writeListBegin(new TList(TType.STRUCT, this.lintString.size())); - for (IntString _iter15 : this.lintString) { + for (IntString _iter15 : this.lintString) + { _iter15.write(oprot); } oprot.writeListEnd(); @@ -669,7 +839,8 @@ public class Complex implements TBase, java.io.Serializable, Cloneable { 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()) { + for (Map.Entry _iter16 : this.mStringString.entrySet()) + { oprot.writeString(_iter16.getKey()); oprot.writeString(_iter16.getValue()); } @@ -735,7 +906,6 @@ public class Complex 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 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 index 248413b..a8d40c5 100644 --- 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 @@ -9,44 +9,113 @@ 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 IntString implements TBase, java.io.Serializable, Cloneable { +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; + /** 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; + } } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - put(MYINT, new FieldMetaData("myint", TFieldRequirementType.DEFAULT, + // 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))); - put(MYSTRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.MY_STRING, new FieldMetaData("myString", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.STRING))); - put(UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, + tmpMap.put(_Fields.UNDERSCORE_INT, new FieldMetaData("underscore_int", TFieldRequirementType.DEFAULT, new FieldValueMetaData(TType.I32))); - }}); - - static { + metaDataMap = Collections.unmodifiableMap(tmpMap); FieldMetaData.addStructMetaDataMap(IntString.class, metaDataMap); } @@ -60,65 +129,80 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { { this(); this.myint = myint; - this.__isset.myint = true; + setMyintIsSet(true); this.myString = myString; this.underscore_int = underscore_int; - this.__isset.underscore_int = true; + setUnderscore_intIsSet(true); } /** * Performs a deep copy on other. */ public IntString(IntString other) { - __isset.myint = other.__isset.myint; + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); 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 deepCopy() { + return new IntString(this); + } + + @Deprecated public IntString clone() { 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) { + public IntString setMyint(int myint) { this.myint = myint; - this.__isset.myint = true; + setMyintIsSet(true); + return this; } public void unsetMyint() { - this.__isset.myint = false; + __isset_bit_vector.clear(__MYINT_ISSET_ID); } - // Returns true if field myint is set (has been asigned a value) and false otherwise + /** Returns true if field myint is set (has been asigned a value) and false otherwise */ public boolean isSetMyint() { - return this.__isset.myint; + return __isset_bit_vector.get(__MYINT_ISSET_ID); } public void setMyintIsSet(boolean value) { - this.__isset.myint = value; + __isset_bit_vector.set(__MYINT_ISSET_ID, value); } public String getMyString() { return this.myString; } - public void setMyString(String myString) { + public IntString setMyString(String myString) { this.myString = myString; + return this; } public void unsetMyString() { this.myString = null; } - // Returns true if field myString is set (has been asigned a value) and false otherwise + /** Returns true if field myString is set (has been asigned a value) and false otherwise */ public boolean isSetMyString() { return this.myString != null; } @@ -133,26 +217,27 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { return this.underscore_int; } - public void setUnderscore_int(int underscore_int) { + public IntString setUnderscore_int(int underscore_int) { this.underscore_int = underscore_int; - this.__isset.underscore_int = true; + setUnderscore_intIsSet(true); + return this; } public void unsetUnderscore_int() { - this.__isset.underscore_int = false; + __isset_bit_vector.clear(__UNDERSCORE_INT_ISSET_ID); } - // Returns true if field underscore_int is set (has been asigned a value) and false otherwise + /** 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; + return __isset_bit_vector.get(__UNDERSCORE_INT_ISSET_ID); } public void setUnderscore_intIsSet(boolean value) { - this.__isset.underscore_int = value; + __isset_bit_vector.set(__UNDERSCORE_INT_ISSET_ID, value); } - public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { + public void setFieldValue(_Fields field, Object value) { + switch (field) { case MYINT: if (value == null) { unsetMyint(); @@ -161,7 +246,7 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { } break; - case MYSTRING: + case MY_STRING: if (value == null) { unsetMyString(); } else { @@ -177,39 +262,47 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { case MYINT: return new Integer(getMyint()); - case MYSTRING: + case MY_STRING: return getMyString(); case UNDERSCORE_INT: return new Integer(getUnderscore_int()); - 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case MYINT: return isSetMyint(); - case MYSTRING: + case MY_STRING: return isSetMyString(); case UNDERSCORE_INT: return isSetUnderscore_int(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -260,6 +353,44 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -269,40 +400,37 @@ public class IntString implements TBase, java.io.Serializable, Cloneable { if (field.type == TType.STOP) { break; } - switch (field.id) - { - case MYINT: + switch (field.id) { + case 1: // MYINT if (field.type == TType.I32) { this.myint = iprot.readI32(); - this.__isset.myint = true; + setMyintIsSet(true); } else { TProtocolUtil.skip(iprot, field.type); } break; - case MYSTRING: + case 2: // MY_STRING if (field.type == TType.STRING) { this.myString = iprot.readString(); } else { TProtocolUtil.skip(iprot, field.type); } break; - case UNDERSCORE_INT: + case 3: // UNDERSCORE_INT if (field.type == TType.I32) { this.underscore_int = iprot.readI32(); - this.__isset.underscore_int = true; + setUnderscore_intIsSet(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(); } @@ -352,7 +480,6 @@ public class IntString 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 serde/src/gen-php/serde/serde_constants.php serde/src/gen-php/serde/serde_constants.php new file mode 100644 index 0000000..f6f6baa --- /dev/null +++ serde/src/gen-php/serde/serde_constants.php @@ -0,0 +1,93 @@ + 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/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/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/src/gen-cpp/ThriftHive.cpp service/src/gen-cpp/ThriftHive.cpp deleted file mode 100644 index 724e4cb..0000000 --- service/src/gen-cpp/ThriftHive.cpp +++ /dev/null @@ -1,1914 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "ThriftHive.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -uint32_t ThriftHive_execute_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->query); - this->__isset.query = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeString(this->query); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeString((*(this->query))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_execute_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->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_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 += this->ex.write(oprot); - xfer += oprot->writeFieldEnd(); - } - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_execute_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->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_fetchOne_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_fetchOne_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHive_fetchOne_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_fetchOne_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->success); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->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_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->writeString(this->success); - 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_fetchOne_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString((*(this->success))); - this->__isset.success = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 1: - if (ftype == apache::thrift::protocol::T_STRUCT) { - xfer += this->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_fetchN_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->numRows); - this->__isset.numRows = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeI32(this->numRows); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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->writeI32((*(this->numRows))); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_fetchN_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size1; - apache::thrift::protocol::TType _etype4; - iprot->readListBegin(_etype4, _size1); - this->success.resize(_size1); - uint32_t _i5; - for (_i5 = 0; _i5 < _size1; ++_i5) - { - xfer += iprot->readString(this->success[_i5]); - } - iprot->readListEnd(); - } - 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_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter6; - for (_iter6 = this->success.begin(); _iter6 != this->success.end(); ++_iter6) - { - xfer += oprot->writeString((*_iter6)); - } - xfer += oprot->writeListEnd(); - } - 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_fetchN_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size7; - apache::thrift::protocol::TType _etype10; - iprot->readListBegin(_etype10, _size7); - (*(this->success)).resize(_size7); - uint32_t _i11; - for (_i11 = 0; _i11 < _size7; ++_i11) - { - xfer += iprot->readString((*(this->success))[_i11]); - } - iprot->readListEnd(); - } - 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_fetchAll_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_fetchAll_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHive_fetchAll_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_fetchAll_result::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - this->success.clear(); - uint32_t _size12; - apache::thrift::protocol::TType _etype15; - iprot->readListBegin(_etype15, _size12); - this->success.resize(_size12); - uint32_t _i16; - for (_i16 = 0; _i16 < _size12; ++_i16) - { - xfer += iprot->readString(this->success[_i16]); - } - iprot->readListEnd(); - } - 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_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->writeListBegin(apache::thrift::protocol::T_STRING, this->success.size()); - std::vector ::const_iterator _iter17; - for (_iter17 = this->success.begin(); _iter17 != this->success.end(); ++_iter17) - { - xfer += oprot->writeString((*_iter17)); - } - xfer += oprot->writeListEnd(); - } - 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_fetchAll_presult::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 0: - if (ftype == apache::thrift::protocol::T_LIST) { - { - (*(this->success)).clear(); - uint32_t _size18; - apache::thrift::protocol::TType _etype21; - iprot->readListBegin(_etype21, _size18); - (*(this->success)).resize(_size18); - uint32_t _i22; - for (_i22 = 0; _i22 < _size18; ++_i22) - { - xfer += iprot->readString((*(this->success))[_i22]); - } - iprot->readListEnd(); - } - 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_getSchema_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_getSchema_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHive_getSchema_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_getSchema_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_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 += 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_getSchema_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 { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHive_getThriftSchema_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_getThriftSchema_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHive_getThriftSchema_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_getThriftSchema_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_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 += 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_getThriftSchema_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 { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t ThriftHive_getClusterStatus_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_getClusterStatus_args::write(apache::thrift::protocol::TProtocol* oprot) const { - uint32_t xfer = 0; - xfer += oprot->writeStructBegin("ThriftHive_getClusterStatus_args"); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -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(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -uint32_t ThriftHive_getClusterStatus_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_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 += 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_getClusterStatus_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 { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -void ThriftHiveClient::execute(const std::string& query) -{ - send_execute(query); - recv_execute(); -} - -void ThriftHiveClient::send_execute(const std::string& query) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("execute", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_execute_pargs args; - args.query = &query; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_execute() -{ - - 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("execute") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_execute_presult result; - result.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - - if (result.__isset.ex) { - throw result.ex; - } - return; -} - -void ThriftHiveClient::fetchOne(std::string& _return) -{ - send_fetchOne(); - recv_fetchOne(_return); -} - -void ThriftHiveClient::send_fetchOne() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchOne", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_fetchOne_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_fetchOne(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("fetchOne") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_fetchOne_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, "fetchOne failed: unknown result"); -} - -void ThriftHiveClient::fetchN(std::vector & _return, const int32_t numRows) -{ - send_fetchN(numRows); - recv_fetchN(_return); -} - -void ThriftHiveClient::send_fetchN(const int32_t numRows) -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchN", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_fetchN_pargs args; - args.numRows = &numRows; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_fetchN(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("fetchN") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_fetchN_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, "fetchN failed: unknown result"); -} - -void ThriftHiveClient::fetchAll(std::vector & _return) -{ - send_fetchAll(); - recv_fetchAll(_return); -} - -void ThriftHiveClient::send_fetchAll() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("fetchAll", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_fetchAll_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_fetchAll(std::vector & _return) -{ - - int32_t rseqid = 0; - std::string fname; - apache::thrift::protocol::TMessageType mtype; - - iprot_->readMessageBegin(fname, mtype, rseqid); - if (mtype == apache::thrift::protocol::T_EXCEPTION) { - apache::thrift::TApplicationException x; - x.read(iprot_); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw x; - } - if (mtype != apache::thrift::protocol::T_REPLY) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); - } - if (fname.compare("fetchAll") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_fetchAll_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, "fetchAll failed: unknown result"); -} - -void ThriftHiveClient::getSchema(Apache::Hadoop::Hive::Schema& _return) -{ - send_getSchema(); - recv_getSchema(_return); -} - -void ThriftHiveClient::send_getSchema() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getSchema", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_getSchema_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_getSchema(Apache::Hadoop::Hive::Schema& _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("getSchema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_getSchema_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, "getSchema failed: unknown result"); -} - -void ThriftHiveClient::getThriftSchema(Apache::Hadoop::Hive::Schema& _return) -{ - send_getThriftSchema(); - recv_getThriftSchema(_return); -} - -void ThriftHiveClient::send_getThriftSchema() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getThriftSchema", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_getThriftSchema_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _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("getThriftSchema") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_getThriftSchema_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, "getThriftSchema failed: unknown result"); -} - -void ThriftHiveClient::getClusterStatus(HiveClusterStatus& _return) -{ - send_getClusterStatus(); - recv_getClusterStatus(_return); -} - -void ThriftHiveClient::send_getClusterStatus() -{ - int32_t cseqid = 0; - oprot_->writeMessageBegin("getClusterStatus", apache::thrift::protocol::T_CALL, cseqid); - - ThriftHive_getClusterStatus_pargs args; - args.write(oprot_); - - oprot_->writeMessageEnd(); - oprot_->getTransport()->flush(); - oprot_->getTransport()->writeEnd(); -} - -void ThriftHiveClient::recv_getClusterStatus(HiveClusterStatus& _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("getClusterStatus") != 0) { - iprot_->skip(apache::thrift::protocol::T_STRUCT); - iprot_->readMessageEnd(); - iprot_->getTransport()->readEnd(); - throw apache::thrift::TApplicationException(apache::thrift::TApplicationException::WRONG_METHOD_NAME); - } - ThriftHive_getClusterStatus_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, "getClusterStatus failed: unknown result"); -} - -bool ThriftHiveProcessor::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 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); - } - (this->*(pfn->second))(seqid, iprot, oprot); - return true; -} - -void ThriftHiveProcessor::process_execute(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot) -{ - ThriftHive_execute_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_execute_result result; - try { - iface_->execute(args.query); - } catch (HiveServerException &ex) { - 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); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_fetchOne_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_fetchOne_result result; - try { - iface_->fetchOne(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("fetchOne", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_fetchN_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_fetchN_result result; - try { - iface_->fetchN(result.success, args.numRows); - 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("fetchN", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_fetchAll_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_fetchAll_result result; - try { - iface_->fetchAll(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("fetchAll", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_getSchema_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_getSchema_result result; - try { - iface_->getSchema(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("getSchema", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_getThriftSchema_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_getThriftSchema_result result; - try { - iface_->getThriftSchema(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("getThriftSchema", apache::thrift::protocol::T_EXCEPTION, seqid); - x.write(oprot); - oprot->writeMessageEnd(); - oprot->getTransport()->flush(); - oprot->getTransport()->writeEnd(); - return; - } - - 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) -{ - ThriftHive_getClusterStatus_args args; - args.read(iprot); - iprot->readMessageEnd(); - iprot->getTransport()->readEnd(); - - ThriftHive_getClusterStatus_result result; - try { - iface_->getClusterStatus(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("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(); -} - -}}} // namespace - diff --git service/src/gen-cpp/ThriftHive.h service/src/gen-cpp/ThriftHive.h deleted file mode 100644 index d2706a2..0000000 --- service/src/gen-cpp/ThriftHive.h +++ /dev/null @@ -1,860 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef ThriftHive_H -#define ThriftHive_H - -#include -#include "hive_service_types.h" -#include "ThriftHiveMetastore.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -class ThriftHiveIf : virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreIf { - public: - virtual ~ThriftHiveIf() {} - virtual void execute(const std::string& query) = 0; - virtual void fetchOne(std::string& _return) = 0; - virtual void fetchN(std::vector & _return, const int32_t numRows) = 0; - virtual void fetchAll(std::vector & _return) = 0; - virtual void getSchema(Apache::Hadoop::Hive::Schema& _return) = 0; - virtual void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) = 0; - virtual void getClusterStatus(HiveClusterStatus& _return) = 0; -}; - -class ThriftHiveNull : virtual public ThriftHiveIf , virtual public Apache::Hadoop::Hive::ThriftHiveMetastoreNull { - public: - virtual ~ThriftHiveNull() {} - void execute(const std::string& /* query */) { - return; - } - void fetchOne(std::string& /* _return */) { - return; - } - void fetchN(std::vector & /* _return */, const int32_t /* numRows */) { - return; - } - void fetchAll(std::vector & /* _return */) { - return; - } - void getSchema(Apache::Hadoop::Hive::Schema& /* _return */) { - return; - } - void getThriftSchema(Apache::Hadoop::Hive::Schema& /* _return */) { - return; - } - void getClusterStatus(HiveClusterStatus& /* _return */) { - return; - } -}; - -class ThriftHive_execute_args { - public: - - ThriftHive_execute_args() : query("") { - } - - virtual ~ThriftHive_execute_args() throw() {} - - std::string query; - - struct __isset { - __isset() : query(false) {} - bool query; - } __isset; - - bool operator == (const ThriftHive_execute_args & rhs) const - { - if (!(query == rhs.query)) - return false; - return true; - } - bool operator != (const ThriftHive_execute_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_execute_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_execute_pargs { - public: - - - virtual ~ThriftHive_execute_pargs() throw() {} - - const std::string* query; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_execute_result { - public: - - ThriftHive_execute_result() { - } - - virtual ~ThriftHive_execute_result() throw() {} - - HiveServerException ex; - - struct __isset { - __isset() : ex(false) {} - bool ex; - } __isset; - - bool operator == (const ThriftHive_execute_result & rhs) const - { - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_execute_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_execute_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_execute_presult { - public: - - - virtual ~ThriftHive_execute_presult() throw() {} - - HiveServerException ex; - - struct __isset { - __isset() : ex(false) {} - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_fetchOne_args { - public: - - ThriftHive_fetchOne_args() { - } - - virtual ~ThriftHive_fetchOne_args() throw() {} - - - bool operator == (const ThriftHive_fetchOne_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHive_fetchOne_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchOne_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchOne_pargs { - public: - - - virtual ~ThriftHive_fetchOne_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchOne_result { - public: - - ThriftHive_fetchOne_result() : success("") { - } - - virtual ~ThriftHive_fetchOne_result() throw() {} - - std::string success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_fetchOne_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_fetchOne_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchOne_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchOne_presult { - public: - - - virtual ~ThriftHive_fetchOne_presult() throw() {} - - std::string* success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_fetchN_args { - public: - - ThriftHive_fetchN_args() : numRows(0) { - } - - virtual ~ThriftHive_fetchN_args() throw() {} - - int32_t numRows; - - struct __isset { - __isset() : numRows(false) {} - bool numRows; - } __isset; - - bool operator == (const ThriftHive_fetchN_args & rhs) const - { - if (!(numRows == rhs.numRows)) - return false; - return true; - } - bool operator != (const ThriftHive_fetchN_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchN_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchN_pargs { - public: - - - virtual ~ThriftHive_fetchN_pargs() throw() {} - - const int32_t* numRows; - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchN_result { - public: - - ThriftHive_fetchN_result() { - } - - virtual ~ThriftHive_fetchN_result() throw() {} - - std::vector success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_fetchN_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_fetchN_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchN_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchN_presult { - public: - - - virtual ~ThriftHive_fetchN_presult() throw() {} - - std::vector * success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_fetchAll_args { - public: - - ThriftHive_fetchAll_args() { - } - - virtual ~ThriftHive_fetchAll_args() throw() {} - - - bool operator == (const ThriftHive_fetchAll_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHive_fetchAll_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchAll_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchAll_pargs { - public: - - - virtual ~ThriftHive_fetchAll_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchAll_result { - public: - - ThriftHive_fetchAll_result() { - } - - virtual ~ThriftHive_fetchAll_result() throw() {} - - std::vector success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_fetchAll_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_fetchAll_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_fetchAll_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_fetchAll_presult { - public: - - - virtual ~ThriftHive_fetchAll_presult() throw() {} - - std::vector * success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_getSchema_args { - public: - - ThriftHive_getSchema_args() { - } - - virtual ~ThriftHive_getSchema_args() throw() {} - - - bool operator == (const ThriftHive_getSchema_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHive_getSchema_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getSchema_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getSchema_pargs { - public: - - - virtual ~ThriftHive_getSchema_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getSchema_result { - public: - - ThriftHive_getSchema_result() { - } - - virtual ~ThriftHive_getSchema_result() throw() {} - - Apache::Hadoop::Hive::Schema success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_getSchema_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_getSchema_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getSchema_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getSchema_presult { - public: - - - virtual ~ThriftHive_getSchema_presult() throw() {} - - Apache::Hadoop::Hive::Schema* success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_getThriftSchema_args { - public: - - ThriftHive_getThriftSchema_args() { - } - - virtual ~ThriftHive_getThriftSchema_args() throw() {} - - - bool operator == (const ThriftHive_getThriftSchema_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHive_getThriftSchema_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getThriftSchema_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getThriftSchema_pargs { - public: - - - virtual ~ThriftHive_getThriftSchema_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getThriftSchema_result { - public: - - ThriftHive_getThriftSchema_result() { - } - - virtual ~ThriftHive_getThriftSchema_result() throw() {} - - Apache::Hadoop::Hive::Schema success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_getThriftSchema_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_getThriftSchema_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getThriftSchema_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getThriftSchema_presult { - public: - - - virtual ~ThriftHive_getThriftSchema_presult() throw() {} - - Apache::Hadoop::Hive::Schema* success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - -}; - -class ThriftHive_getClusterStatus_args { - public: - - ThriftHive_getClusterStatus_args() { - } - - virtual ~ThriftHive_getClusterStatus_args() throw() {} - - - bool operator == (const ThriftHive_getClusterStatus_args & /* rhs */) const - { - return true; - } - bool operator != (const ThriftHive_getClusterStatus_args &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getClusterStatus_args & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getClusterStatus_pargs { - public: - - - virtual ~ThriftHive_getClusterStatus_pargs() throw() {} - - - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getClusterStatus_result { - public: - - ThriftHive_getClusterStatus_result() { - } - - virtual ~ThriftHive_getClusterStatus_result() throw() {} - - HiveClusterStatus success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __isset; - - bool operator == (const ThriftHive_getClusterStatus_result & rhs) const - { - if (!(success == rhs.success)) - return false; - if (!(ex == rhs.ex)) - return false; - return true; - } - bool operator != (const ThriftHive_getClusterStatus_result &rhs) const { - return !(*this == rhs); - } - - bool operator < (const ThriftHive_getClusterStatus_result & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -class ThriftHive_getClusterStatus_presult { - public: - - - virtual ~ThriftHive_getClusterStatus_presult() throw() {} - - HiveClusterStatus* success; - HiveServerException ex; - - struct __isset { - __isset() : success(false), ex(false) {} - bool success; - bool ex; - } __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) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(prot, prot) {} - ThriftHiveClient(boost::shared_ptr iprot, boost::shared_ptr oprot) : - Apache::Hadoop::Hive::ThriftHiveMetastoreClient(iprot, oprot) {} - boost::shared_ptr getInputProtocol() { - return piprot_; - } - boost::shared_ptr getOutputProtocol() { - return poprot_; - } - void execute(const std::string& query); - void send_execute(const std::string& query); - void recv_execute(); - void fetchOne(std::string& _return); - void send_fetchOne(); - void recv_fetchOne(std::string& _return); - void fetchN(std::vector & _return, const int32_t numRows); - void send_fetchN(const int32_t numRows); - void recv_fetchN(std::vector & _return); - void fetchAll(std::vector & _return); - void send_fetchAll(); - void recv_fetchAll(std::vector & _return); - void getSchema(Apache::Hadoop::Hive::Schema& _return); - void send_getSchema(); - void recv_getSchema(Apache::Hadoop::Hive::Schema& _return); - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return); - void send_getThriftSchema(); - void recv_getThriftSchema(Apache::Hadoop::Hive::Schema& _return); - void getClusterStatus(HiveClusterStatus& _return); - void send_getClusterStatus(); - void recv_getClusterStatus(HiveClusterStatus& _return); -}; - -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); - 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); - public: - ThriftHiveProcessor(boost::shared_ptr iface) : - Apache::Hadoop::Hive::ThriftHiveMetastoreProcessor(iface), - iface_(iface) { - processMap_["execute"] = &ThriftHiveProcessor::process_execute; - processMap_["fetchOne"] = &ThriftHiveProcessor::process_fetchOne; - processMap_["fetchN"] = &ThriftHiveProcessor::process_fetchN; - processMap_["fetchAll"] = &ThriftHiveProcessor::process_fetchAll; - processMap_["getSchema"] = &ThriftHiveProcessor::process_getSchema; - processMap_["getThriftSchema"] = &ThriftHiveProcessor::process_getThriftSchema; - processMap_["getClusterStatus"] = &ThriftHiveProcessor::process_getClusterStatus; - } - - virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot); - virtual ~ThriftHiveProcessor() {} -}; - -class ThriftHiveMultiface : virtual public ThriftHiveIf, public Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface { - public: - ThriftHiveMultiface(std::vector >& ifaces) : ifaces_(ifaces) { - std::vector >::iterator iter; - for (iter = ifaces.begin(); iter != ifaces.end(); ++iter) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(*iter); - } - } - virtual ~ThriftHiveMultiface() {} - protected: - std::vector > ifaces_; - ThriftHiveMultiface() {} - void add(boost::shared_ptr iface) { - Apache::Hadoop::Hive::ThriftHiveMetastoreMultiface::add(iface); - ifaces_.push_back(iface); - } - public: - void execute(const std::string& query) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - ifaces_[i]->execute(query); - } - } - - void fetchOne(std::string& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchOne(_return); - return; - } else { - ifaces_[i]->fetchOne(_return); - } - } - } - - void fetchN(std::vector & _return, const int32_t numRows) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchN(_return, numRows); - return; - } else { - ifaces_[i]->fetchN(_return, numRows); - } - } - } - - void fetchAll(std::vector & _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->fetchAll(_return); - return; - } else { - ifaces_[i]->fetchAll(_return); - } - } - } - - void getSchema(Apache::Hadoop::Hive::Schema& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getSchema(_return); - return; - } else { - ifaces_[i]->getSchema(_return); - } - } - } - - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getThriftSchema(_return); - return; - } else { - ifaces_[i]->getThriftSchema(_return); - } - } - } - - void getClusterStatus(HiveClusterStatus& _return) { - uint32_t sz = ifaces_.size(); - for (uint32_t i = 0; i < sz; ++i) { - if (i == sz - 1) { - ifaces_[i]->getClusterStatus(_return); - return; - } else { - ifaces_[i]->getClusterStatus(_return); - } - } - } - -}; - -}}} // namespace - -#endif diff --git service/src/gen-cpp/ThriftHive_server.skeleton.cpp service/src/gen-cpp/ThriftHive_server.skeleton.cpp deleted file mode 100644 index 39c28e7..0000000 --- service/src/gen-cpp/ThriftHive_server.skeleton.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// This autogenerated skeleton file illustrates how to build a server. -// You should copy it to another filename to avoid overwriting it. - -#include "ThriftHive.h" -#include -#include -#include -#include - -using namespace apache::thrift; -using namespace apache::thrift::protocol; -using namespace apache::thrift::transport; -using namespace apache::thrift::server; - -using boost::shared_ptr; - -using namespace Apache::Hadoop::Hive; - -class ThriftHiveHandler : virtual public ThriftHiveIf { - public: - ThriftHiveHandler() { - // Your initialization goes here - } - - void execute(const std::string& query) { - // Your implementation goes here - printf("execute\n"); - } - - void fetchOne(std::string& _return) { - // Your implementation goes here - printf("fetchOne\n"); - } - - void fetchN(std::vector & _return, const int32_t numRows) { - // Your implementation goes here - printf("fetchN\n"); - } - - void fetchAll(std::vector & _return) { - // Your implementation goes here - printf("fetchAll\n"); - } - - void getSchema(Apache::Hadoop::Hive::Schema& _return) { - // Your implementation goes here - printf("getSchema\n"); - } - - void getThriftSchema(Apache::Hadoop::Hive::Schema& _return) { - // Your implementation goes here - printf("getThriftSchema\n"); - } - - void getClusterStatus(HiveClusterStatus& _return) { - // Your implementation goes here - printf("getClusterStatus\n"); - } - -}; - -int main(int argc, char **argv) { - int port = 9090; - shared_ptr handler(new ThriftHiveHandler()); - shared_ptr processor(new ThriftHiveProcessor(handler)); - shared_ptr serverTransport(new TServerSocket(port)); - shared_ptr transportFactory(new TBufferedTransportFactory()); - shared_ptr protocolFactory(new TBinaryProtocolFactory()); - - TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); - server.serve(); - return 0; -} - diff --git service/src/gen-cpp/hive_service_constants.cpp service/src/gen-cpp/hive_service_constants.cpp deleted file mode 100644 index 7ee5b0c..0000000 --- service/src/gen-cpp/hive_service_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 "hive_service_constants.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -const hive_serviceConstants g_hive_service_constants; - -hive_serviceConstants::hive_serviceConstants() { -} - -}}} // namespace - diff --git service/src/gen-cpp/hive_service_constants.h service/src/gen-cpp/hive_service_constants.h deleted file mode 100644 index 821dead..0000000 --- service/src/gen-cpp/hive_service_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 hive_service_CONSTANTS_H -#define hive_service_CONSTANTS_H - -#include "hive_service_types.h" - -namespace Apache { namespace Hadoop { namespace Hive { - -class hive_serviceConstants { - public: - hive_serviceConstants(); - -}; - -extern const hive_serviceConstants g_hive_service_constants; - -}}} // namespace - -#endif diff --git service/src/gen-cpp/hive_service_types.cpp service/src/gen-cpp/hive_service_types.cpp deleted file mode 100644 index 5e9a9b9..0000000 --- service/src/gen-cpp/hive_service_types.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#include "hive_service_types.h" - -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 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->taskTrackers); - this->__isset.taskTrackers = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 2: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->mapTasks); - this->__isset.mapTasks = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 3: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->reduceTasks); - this->__isset.reduceTasks = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 4: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->maxMapTasks); - this->__isset.maxMapTasks = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 5: - if (ftype == apache::thrift::protocol::T_I32) { - xfer += iprot->readI32(this->maxReduceTasks); - this->__isset.maxReduceTasks = true; - } else { - xfer += iprot->skip(ftype); - } - break; - case 6: - if (ftype == apache::thrift::protocol::T_I32) { - int32_t ecast0; - xfer += iprot->readI32(ecast0); - this->state = (JobTrackerState)ecast0; - this->__isset.state = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -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->writeI32(this->taskTrackers); - xfer += oprot->writeFieldEnd(); - 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->writeI32(this->reduceTasks); - xfer += oprot->writeFieldEnd(); - 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->writeI32(this->maxReduceTasks); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldBegin("state", apache::thrift::protocol::T_I32, 6); - xfer += oprot->writeI32((int32_t)this->state); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - 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}; - -uint32_t HiveServerException::read(apache::thrift::protocol::TProtocol* iprot) { - - uint32_t xfer = 0; - std::string fname; - apache::thrift::protocol::TType ftype; - int16_t fid; - - xfer += iprot->readStructBegin(fname); - - using apache::thrift::protocol::TProtocolException; - - - while (true) - { - xfer += iprot->readFieldBegin(fname, ftype, fid); - if (ftype == apache::thrift::protocol::T_STOP) { - break; - } - switch (fid) - { - case 1: - if (ftype == apache::thrift::protocol::T_STRING) { - xfer += iprot->readString(this->message); - this->__isset.message = true; - } else { - xfer += iprot->skip(ftype); - } - break; - default: - xfer += iprot->skip(ftype); - break; - } - xfer += iprot->readFieldEnd(); - } - - xfer += iprot->readStructEnd(); - - return xfer; -} - -uint32_t 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->writeString(this->message); - xfer += oprot->writeFieldEnd(); - xfer += oprot->writeFieldStop(); - xfer += oprot->writeStructEnd(); - return xfer; -} - -}}} // namespace diff --git service/src/gen-cpp/hive_service_types.h service/src/gen-cpp/hive_service_types.h deleted file mode 100644 index 930b0ec..0000000 --- service/src/gen-cpp/hive_service_types.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Autogenerated by Thrift - * - * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING - */ -#ifndef hive_service_TYPES_H -#define hive_service_TYPES_H - -#include -#include -#include - -#include "fb303_types.h" -#include "hive_metastore_types.h" - - -namespace Apache { namespace Hadoop { namespace Hive { - -enum JobTrackerState { - INITIALIZING = 1, - RUNNING = 2 -}; - -class HiveClusterStatus { - public: - - static const char* ascii_fingerprint; // = "D514EDCFFC86F64A2E924DCD16D4FAD8"; - static const uint8_t binary_fingerprint[16]; // = {0xD5,0x14,0xED,0xCF,0xFC,0x86,0xF6,0x4A,0x2E,0x92,0x4D,0xCD,0x16,0xD4,0xFA,0xD8}; - - HiveClusterStatus() : taskTrackers(0), mapTasks(0), reduceTasks(0), maxMapTasks(0), maxReduceTasks(0) { - } - - virtual ~HiveClusterStatus() throw() {} - - int32_t taskTrackers; - int32_t mapTasks; - 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; - - bool operator == (const HiveClusterStatus & rhs) const - { - if (!(taskTrackers == rhs.taskTrackers)) - return false; - if (!(mapTasks == rhs.mapTasks)) - return false; - if (!(reduceTasks == rhs.reduceTasks)) - return false; - if (!(maxMapTasks == rhs.maxMapTasks)) - return false; - if (!(maxReduceTasks == rhs.maxReduceTasks)) - return false; - if (!(state == rhs.state)) - return false; - return true; - } - bool operator != (const HiveClusterStatus &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HiveClusterStatus & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -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}; - - HiveServerException() : message("") { - } - - virtual ~HiveServerException() throw() {} - - std::string message; - - struct __isset { - __isset() : message(false) {} - bool message; - } __isset; - - bool operator == (const HiveServerException & rhs) const - { - if (!(message == rhs.message)) - return false; - return true; - } - bool operator != (const HiveServerException &rhs) const { - return !(*this == rhs); - } - - bool operator < (const HiveServerException & ) const; - - uint32_t read(apache::thrift::protocol::TProtocol* iprot); - uint32_t write(apache::thrift::protocol::TProtocol* oprot) const; - -}; - -}}} // namespace - -#endif 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..7f1a4ba 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,82 @@ 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 deepCopy() { + return new HiveClusterStatus(this); + } + + @Deprecated public HiveClusterStatus clone() { 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 +240,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 +262,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 +284,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 +306,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 void setMaxReduceTasksIsSet(boolean value) { + __isset_bit_vector.set(__MAXREDUCETASKS_ISSET_ID, value); } - public int getState() { + /** + * + * @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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case TASKTRACKERS: + public void setStateIsSet(boolean value) { + if (!value) { + this.state = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TASK_TRACKERS: if (value == null) { unsetTaskTrackers(); } else { @@ -236,7 +363,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAPTASKS: + case MAP_TASKS: if (value == null) { unsetMapTasks(); } else { @@ -244,7 +371,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case REDUCETASKS: + case REDUCE_TASKS: if (value == null) { unsetReduceTasks(); } else { @@ -252,7 +379,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAXMAPTASKS: + case MAX_MAP_TASKS: if (value == null) { unsetMaxMapTasks(); } else { @@ -260,7 +387,7 @@ public class HiveClusterStatus implements TBase, java.io.Serializable, Cloneable } break; - case MAXREDUCETASKS: + case MAX_REDUCE_TASKS: if (value == null) { unsetMaxReduceTasks(); } else { @@ -272,58 +399,66 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -384,12 +519,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 +536,71 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -410,64 +610,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 +686,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 +721,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 +733,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..5ff05e5 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,34 @@ 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 deepCopy() { + return new HiveServerException(this); + } + + @Deprecated public HiveServerException clone() { 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 +177,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 +222,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 +243,7 @@ public class HiveServerException extends Exception implements TBase, java.io.Ser } break; - case ERRORCODE: + case ERROR_CODE: if (value == null) { unsetErrorCode(); } else { @@ -161,39 +259,47 @@ 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + 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(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -244,6 +350,44 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -253,24 +397,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 +422,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 +480,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..1288599 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,20 @@ public class ThriftHive { } } - @Override + public execute_args deepCopy() { + return new execute_args(this); + } + + @Deprecated public execute_args clone() { return new execute_args(this); } + @Override + public void clear() { + this.query = null; + } + public String getQuery() { return this.query; } @@ -649,13 +1105,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 +1126,37 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case QUERY: return isSetQuery(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -719,6 +1189,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -728,9 +1218,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 +1228,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -779,28 +1266,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 +1365,20 @@ public class ThriftHive { } } - @Override + public execute_result deepCopy() { + return new execute_result(this); + } + + @Deprecated public execute_result clone() { return new execute_result(this); } + @Override + public void clear() { + this.ex = null; + } + public HiveServerException getEx() { return this.ex; } @@ -840,13 +1391,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 +1412,37 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -910,6 +1475,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -919,9 +1504,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 +1515,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -963,25 +1545,81 @@ public class ThriftHive { } else { sb.append(this.ex); } - 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 fetchOne_args implements TBase, java.io.Serializable, Cloneable { + private static final TStruct STRUCT_DESC = new TStruct("fetchOne_args"); + + + + /** 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; + } - 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 fetchOne_args implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("fetchOne_args"); + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } - public static final Map metaDataMap = Collections.unmodifiableMap(new HashMap() {{ - }}); + 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 +1632,47 @@ public class ThriftHive { public fetchOne_args(fetchOne_args other) { } - @Override + public fetchOne_args deepCopy() { + return new fetchOne_args(this); + } + + @Deprecated public fetchOne_args clone() { return new fetchOne_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -1042,6 +1696,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1051,16 +1716,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 +1745,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 +1856,21 @@ public class ThriftHive { } } - @Override + public fetchOne_result deepCopy() { + return new fetchOne_result(this); + } + + @Deprecated public fetchOne_result clone() { return new fetchOne_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public String getSuccess() { return this.success; } @@ -1154,11 +1883,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 +1906,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 +1935,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -1263,6 +2012,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1272,16 +2050,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 +2068,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1342,29 +2117,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 +2207,58 @@ 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 deepCopy() { + return new fetchN_args(this); + } + + @Deprecated public fetchN_args clone() { 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 setFieldValue(int fieldID, Object value) { - switch (fieldID) { - case NUMROWS: + public void setNumRowsIsSet(boolean value) { + __isset_bit_vector.set(__NUMROWS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NUM_ROWS: if (value == null) { unsetNumRows(); } else { @@ -1420,29 +2266,37 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - case NUMROWS: + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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: + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { + case NUM_ROWS: return isSetNumRows(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -1475,6 +2329,26 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1484,24 +2358,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 +2401,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 { + 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; - 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(fetchN_result.class, metaDataMap); } @@ -1589,11 +2517,21 @@ public class ThriftHive { } } - @Override + public fetchN_result deepCopy() { + return new fetchN_result(this); + } + + @Deprecated public fetchN_result clone() { 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 +2559,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 +2582,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 +2611,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -1730,6 +2688,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1739,9 +2726,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 +2744,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 +2754,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -1784,7 +2768,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 +2810,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 +2890,47 @@ public class ThriftHive { public fetchAll_args(fetchAll_args other) { } - @Override + public fetchAll_args deepCopy() { + return new fetchAll_args(this); + } + + @Deprecated public fetchAll_args clone() { 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 void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -1897,6 +2954,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -1906,16 +2974,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 +3003,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 +3119,21 @@ public class ThriftHive { } } - @Override + public fetchAll_result deepCopy() { + return new fetchAll_result(this); + } + + @Deprecated public fetchAll_result clone() { 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 +3161,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 +3184,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 +3213,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2138,6 +3290,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2147,9 +3328,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 +3346,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 +3356,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2192,7 +3370,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 +3412,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 +3492,47 @@ public class ThriftHive { public getSchema_args(getSchema_args other) { } - @Override + public getSchema_args deepCopy() { + return new getSchema_args(this); + } + + @Deprecated public getSchema_args clone() { return new getSchema_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2305,6 +3556,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2314,16 +3576,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 +3605,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 +3716,21 @@ public class ThriftHive { } } - @Override + public getSchema_result deepCopy() { + return new getSchema_result(this); + } + + @Deprecated public getSchema_result clone() { 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 +3743,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 +3766,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 +3795,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2526,6 +3872,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2535,9 +3910,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 +3919,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 +3929,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2606,18 +3978,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 +4058,47 @@ public class ThriftHive { public getThriftSchema_args(getThriftSchema_args other) { } - @Override + public getThriftSchema_args deepCopy() { + return new getThriftSchema_args(this); + } + + @Deprecated public getThriftSchema_args clone() { return new getThriftSchema_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2678,6 +4122,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2687,16 +4142,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 +4171,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 +4282,21 @@ public class ThriftHive { } } - @Override + public getThriftSchema_result deepCopy() { + return new getThriftSchema_result(this); + } + + @Deprecated public getThriftSchema_result clone() { 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 +4309,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 +4332,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 +4361,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -2899,6 +4438,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -2908,9 +4476,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 +4485,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 +4495,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -2979,18 +4544,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 +4624,47 @@ public class ThriftHive { public getClusterStatus_args(getClusterStatus_args other) { } - @Override + public getClusterStatus_args deepCopy() { + return new getClusterStatus_args(this); + } + + @Deprecated public getClusterStatus_args clone() { return new getClusterStatus_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); + } + + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); } - public Object getFieldValue(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) { + 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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3051,6 +4688,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3060,16 +4708,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 +4737,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 +4848,21 @@ public class ThriftHive { } } - @Override + public getClusterStatus_result deepCopy() { + return new getClusterStatus_result(this); + } + + @Deprecated public getClusterStatus_result clone() { return new getClusterStatus_result(this); } + @Override + public void clear() { + this.success = null; + this.ex = null; + } + public HiveClusterStatus getSuccess() { return this.success; } @@ -3163,11 +4875,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 +4898,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 +4927,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3272,6 +5004,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3281,9 +5042,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 +5051,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 +5061,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3352,18 +5110,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 +5190,47 @@ public class ThriftHive { public getQueryPlan_args(getQueryPlan_args other) { } - @Override + public getQueryPlan_args deepCopy() { + return new getQueryPlan_args(this); + } + + @Deprecated public getQueryPlan_args clone() { return new getQueryPlan_args(this); } + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + public void setFieldValue(int fieldID, Object value) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + public Object getFieldValue(_Fields field) { + switch (field) { } + throw new IllegalStateException(); } - public Object getFieldValue(int fieldID) { - switch (fieldID) { - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_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!"); - } + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3424,6 +5254,17 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3433,16 +5274,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 +5303,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 +5414,21 @@ public class ThriftHive { } } - @Override + public getQueryPlan_result deepCopy() { + return new getQueryPlan_result(this); + } + + @Deprecated public getQueryPlan_result clone() { 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 +5441,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 +5464,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 +5493,42 @@ public class ThriftHive { } break; - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } } - public Object getFieldValue(int fieldID) { - switch (fieldID) { + public void setFieldValue(int fieldID, Object value) { + setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value); + } + + 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) { + public Object getFieldValue(int fieldId) { + return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId)); + } + + /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + switch (field) { case SUCCESS: return isSetSuccess(); case EX: return isSetEx(); - default: - throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!"); } + throw new IllegalStateException(); + } + + public boolean isSet(int fieldID) { + return isSet(_Fields.findByThriftIdOrThrow(fieldID)); } @Override @@ -3645,6 +5570,35 @@ 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 void read(TProtocol iprot) throws TException { TField field; iprot.readStructBegin(); @@ -3654,9 +5608,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 +5617,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 +5627,10 @@ public class ThriftHive { break; default: TProtocolUtil.skip(iprot, field.type); - break; } iprot.readFieldEnd(); } iprot.readStructEnd(); - validate(); } @@ -3725,7 +5676,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 diff --git service/src/gen-py/hive_service/ttypes.py service/src/gen-py/hive_service/ttypes.py index 3e52549..d4b4139 100644 --- service/src/gen-py/hive_service/ttypes.py +++ service/src/gen-py/hive_service/ttypes.py @@ -22,6 +22,16 @@ class JobTrackerState: INITIALIZING = 1 RUNNING = 2 + _VALUES_TO_NAMES = { + 1: "INITIALIZING", + 2: "RUNNING", + } + + _NAMES_TO_VALUES = { + "INITIALIZING": 1, + "RUNNING": 2, + } + class HiveClusterStatus: """ Attributes: 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 deleted file mode 100644 index 2ebda01..0000000 --- service/src/gen-rb/hive_service_constants.rb +++ /dev/null @@ -1,9 +0,0 @@ -# -# Autogenerated by Thrift -# -# 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 deleted file mode 100644 index 001fa29..0000000 --- service/src/gen-rb/hive_service_types.rb +++ /dev/null @@ -1,24 +0,0 @@ -# -# Autogenerated by Thrift -# -# 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' - - -class HiveServerException < StandardError - include ThriftStruct - def initialize(message=nil) - super() - self.message = message - end - - attr_accessor :message - FIELDS = { - -1 => {:type => TType::STRING, :name => 'message'} - } -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; } /**